@Only-api
@Post
@Get
@Delete
@MedicationStatement
Feature: Intrathecal resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific MedicationStatement node. This resource is part of the Chemotherapy.
File name: xaj.feature
Relative path: api/xaj.feature
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:55:40.279 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:41.209 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:41.209 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EoNYjoko9gW7jwUL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20170/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20170/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:41.209 [print] {
"resourceType": "MedicationStatement",
"id": "20170",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:44.332+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:41.209 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:41.211 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:41.211 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EoNYjoko9gW7jwUL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20170/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20170/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:41.211 [print] {
"resourceType": "MedicationStatement",
"id": "20170",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:44.332+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:41.211 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:55:41.816 [print] {
"resourceType": "MedicationStatement",
"id": "20170",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:44.332+02:00",
"source": "#EoNYjoko9gW7jwUL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:55:42.456 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:55:43.084 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:55:45.584+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:55:45.584+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:55:43.085 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:43.750 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:43.750 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v00YeECnzqax4DLn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20171/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20171/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:43.750 [print] {
"resourceType": "MedicationStatement",
"id": "20171",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:46.880+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:43.750 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:43.752 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:43.752 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v00YeECnzqax4DLn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20171/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20171/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:43.752 [print] {
"resourceType": "MedicationStatement",
"id": "20171",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:46.880+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:43.752 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:55:44.402 [print] {
"resourceType": "MedicationStatement",
"id": "20171",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:46.880+02:00",
"source": "#v00YeECnzqax4DLn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:55:45.005 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:55:45.624 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:55:48.140+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:55:48.140+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:55:45.625 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:46.273 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:46.273 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ct47xRcFmUWjp8bt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20172/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20172/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:46.273 [print] {
"resourceType": "MedicationStatement",
"id": "20172",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:49.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:46.273 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:46.274 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:46.274 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ct47xRcFmUWjp8bt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20172/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20172/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:46.274 [print] {
"resourceType": "MedicationStatement",
"id": "20172",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:49.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:46.274 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:55:46.939 [print] {
"resourceType": "MedicationStatement",
"id": "20172",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:49.399+02:00",
"source": "#ct47xRcFmUWjp8bt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:55:47.529 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:55:48.157 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:55:50.664+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:55:50.664+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:55:48.158 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:48.742 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:48.742 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NJMnC7IdxoAy5j0x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20173/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20173/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:48.743 [print] {
"resourceType": "MedicationStatement",
"id": "20173",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:51.880+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:48.743 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:48.744 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:48.744 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NJMnC7IdxoAy5j0x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20173/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20173/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:48.744 [print] {
"resourceType": "MedicationStatement",
"id": "20173",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:51.880+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:48.744 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:55:49.357 [print] {
"resourceType": "MedicationStatement",
"id": "20173",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:51.880+02:00",
"source": "#NJMnC7IdxoAy5j0x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:55:50.176 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:55:50.775 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:55:53.312+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:55:53.312+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:55:50.777 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:51.383 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:51.383 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CeRYNX8hFTs36jLz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20174/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20174/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:51.383 [print] {
"resourceType": "MedicationStatement",
"id": "20174",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:54.516+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:51.383 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:51.385 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:51.385 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CeRYNX8hFTs36jLz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20174/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20174/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:51.385 [print] {
"resourceType": "MedicationStatement",
"id": "20174",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:54.516+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:51.385 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:55:51.995 [print] {
"resourceType": "MedicationStatement",
"id": "20174",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:54.516+02:00",
"source": "#CeRYNX8hFTs36jLz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:55:52.622 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:55:53.228 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:55:55.755+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:55:55.755+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:55:53.229 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:53.855 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:53.855 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4dspP0bGR03mKVyJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20175/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20175/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:53.855 [print] {
"resourceType": "MedicationStatement",
"id": "20175",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:56.990+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:53.855 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:53.856 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:53.856 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4dspP0bGR03mKVyJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20175/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20175/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:53.856 [print] {
"resourceType": "MedicationStatement",
"id": "20175",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:56.990+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:53.856 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:55:54.484 [print] {
"resourceType": "MedicationStatement",
"id": "20175",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:56.990+02:00",
"source": "#4dspP0bGR03mKVyJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:55:55.090 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:55:55.680 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:55:58.222+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:55:58.222+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:55:55.681 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:56.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:56.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8LsvUazDWBvuUeDz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20176/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20176/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:56.305 [print] {
"resourceType": "MedicationStatement",
"id": "20176",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:59.430+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:56.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:56.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:56.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8LsvUazDWBvuUeDz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20176/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:55:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20176/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:55:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:56.307 [print] {
"resourceType": "MedicationStatement",
"id": "20176",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:59.430+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:56.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:55:56.946 [print] {
"resourceType": "MedicationStatement",
"id": "20176",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:55:59.430+02:00",
"source": "#8LsvUazDWBvuUeDz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:55:57.571 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:55:58.176 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:00.696+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:00.696+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:55:58.178 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:58.786 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:58.786 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D8e5qQSbc77mrh9q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20177/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20177/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:58.786 [print] {
"resourceType": "MedicationStatement",
"id": "20177",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:01.923+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:58.787 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:55:58.788 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:55:58.788 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D8e5qQSbc77mrh9q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20177/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20177/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:55:58.788 [print] {
"resourceType": "MedicationStatement",
"id": "20177",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:01.923+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:55:58.788 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:55:59.419 [print] {
"resourceType": "MedicationStatement",
"id": "20177",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:01.923+02:00",
"source": "#D8e5qQSbc77mrh9q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:00.053 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:00.677 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:03.183+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:03.183+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:00.678 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:01.288 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:01.288 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hP251aZwU3cyEdNg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20178/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20178/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:01.288 [print] {
"resourceType": "MedicationStatement",
"id": "20178",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:04.415+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:01.288 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:01.289 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:01.289 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hP251aZwU3cyEdNg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20178/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20178/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:01.289 [print] {
"resourceType": "MedicationStatement",
"id": "20178",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:04.415+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:01.289 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:01.886 [print] {
"resourceType": "MedicationStatement",
"id": "20178",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:04.415+02:00",
"source": "#hP251aZwU3cyEdNg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:02.522 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:03.136 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:05.633+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:05.633+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:03.137 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:03.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:03.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dun08FEC15hnolMF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20179/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20179/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:03.761 [print] {
"resourceType": "MedicationStatement",
"id": "20179",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:06.896+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:03.761 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:03.762 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:03.762 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dun08FEC15hnolMF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20179/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20179/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:03.762 [print] {
"resourceType": "MedicationStatement",
"id": "20179",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:06.896+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:03.762 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:04.367 [print] {
"resourceType": "MedicationStatement",
"id": "20179",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:06.896+02:00",
"source": "#Dun08FEC15hnolMF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:05.025 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:05.613 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:08.152+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:08.152+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:05.616 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:06.232 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:06.232 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7gmctqaMK5Vzco58"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20180/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20180/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:06.232 [print] {
"resourceType": "MedicationStatement",
"id": "20180",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:09.368+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:06.232 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:06.234 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:06.234 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7gmctqaMK5Vzco58"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20180/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20180/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:06.234 [print] {
"resourceType": "MedicationStatement",
"id": "20180",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:09.368+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:06.234 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:06.841 [print] {
"resourceType": "MedicationStatement",
"id": "20180",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:09.368+02:00",
"source": "#7gmctqaMK5Vzco58",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:07.458 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:08.081 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:10.591+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:10.591+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:08.082 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:08.692 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:08.692 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QBQdRk17tjFDLJBE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20181/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20181/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:08.692 [print] {
"resourceType": "MedicationStatement",
"id": "20181",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:11.825+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:08.692 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:08.693 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:08.693 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QBQdRk17tjFDLJBE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20181/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20181/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:08.693 [print] {
"resourceType": "MedicationStatement",
"id": "20181",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:11.825+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:08.693 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:09.283 [print] {
"resourceType": "MedicationStatement",
"id": "20181",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:11.825+02:00",
"source": "#QBQdRk17tjFDLJBE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:09.895 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:10.521 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:13.032+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:13.032+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:10.522 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:11.136 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:11.136 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FcYfDuNW6ooN3T0t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20182/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20182/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:11.136 [print] {
"resourceType": "MedicationStatement",
"id": "20182",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:14.270+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:11.136 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:11.138 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:11.138 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FcYfDuNW6ooN3T0t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20182/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20182/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:11.138 [print] {
"resourceType": "MedicationStatement",
"id": "20182",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:14.270+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:11.138 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:11.732 [print] {
"resourceType": "MedicationStatement",
"id": "20182",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:14.270+02:00",
"source": "#FcYfDuNW6ooN3T0t",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:12.406 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:13.026 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:15.544+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:15.544+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:13.027 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:13.649 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:13.649 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i9Lv3hyId0sUB9Hw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20183/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20183/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:13.649 [print] {
"resourceType": "MedicationStatement",
"id": "20183",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:16.774+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:13.649 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:13.650 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:13.650 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i9Lv3hyId0sUB9Hw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20183/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20183/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:13.650 [print] {
"resourceType": "MedicationStatement",
"id": "20183",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:16.774+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:13.650 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:14.274 [print] {
"resourceType": "MedicationStatement",
"id": "20183",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:16.774+02:00",
"source": "#i9Lv3hyId0sUB9Hw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:14.907 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:15.547 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:18.042+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:18.042+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:15.548 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:16.153 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:16.153 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UN1msnPrWQJ5KGvL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20184/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20184/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:16.153 [print] {
"resourceType": "MedicationStatement",
"id": "20184",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:19.284+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:16.153 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:16.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:16.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UN1msnPrWQJ5KGvL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20184/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20184/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:16.155 [print] {
"resourceType": "MedicationStatement",
"id": "20184",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:19.284+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:16.155 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:16.748 [print] {
"resourceType": "MedicationStatement",
"id": "20184",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:19.284+02:00",
"source": "#UN1msnPrWQJ5KGvL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:17.399 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:18.003 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:20.523+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:20.523+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:18.004 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:18.621 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:18.621 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l84kPeCJVxuAvlKo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20185/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20185/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:18.621 [print] {
"resourceType": "MedicationStatement",
"id": "20185",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:21.752+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:18.621 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:18.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:18.623 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l84kPeCJVxuAvlKo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20185/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20185/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:18.623 [print] {
"resourceType": "MedicationStatement",
"id": "20185",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:21.752+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:18.623 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:19.233 [print] {
"resourceType": "MedicationStatement",
"id": "20185",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:21.752+02:00",
"source": "#l84kPeCJVxuAvlKo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:19.853 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:20.462 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:22.979+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:22.979+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:20.464 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:21.087 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:21.087 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2Z4yzkA64HAS7dHt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20186/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20186/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:21.087 [print] {
"resourceType": "MedicationStatement",
"id": "20186",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:24.220+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:21.087 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:21.088 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:21.088 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2Z4yzkA64HAS7dHt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20186/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20186/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:21.088 [print] {
"resourceType": "MedicationStatement",
"id": "20186",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:24.220+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:21.088 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:21.687 [print] {
"resourceType": "MedicationStatement",
"id": "20186",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:24.220+02:00",
"source": "#2Z4yzkA64HAS7dHt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:22.310 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:22.906 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:25.445+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:25.445+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:22.907 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:23.526 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:23.526 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DZC43rfKO7zS8CUv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20187/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20187/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:23.526 [print] {
"resourceType": "MedicationStatement",
"id": "20187",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:26.660+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:23.526 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:23.528 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:23.528 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DZC43rfKO7zS8CUv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20187/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20187/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:23.528 [print] {
"resourceType": "MedicationStatement",
"id": "20187",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:26.660+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:23.528 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:24.163 [print] {
"resourceType": "MedicationStatement",
"id": "20187",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:26.660+02:00",
"source": "#DZC43rfKO7zS8CUv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:24.803 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:25.690 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:27.931+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:27.931+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:25.691 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:26.308 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:26.308 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZkuCbcIY2ieJRiYf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20188/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20188/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:26.308 [print] {
"resourceType": "MedicationStatement",
"id": "20188",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:29.439+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:26.308 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:26.309 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:26.309 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZkuCbcIY2ieJRiYf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20188/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20188/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:26.309 [print] {
"resourceType": "MedicationStatement",
"id": "20188",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:29.439+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:26.309 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:26.920 [print] {
"resourceType": "MedicationStatement",
"id": "20188",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:29.439+02:00",
"source": "#ZkuCbcIY2ieJRiYf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:27.526 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:28.154 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:30.659+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:30.659+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:28.154 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:28.766 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:28.766 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8inac9YMtgyIgkW5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20189/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20189/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:28.766 [print] {
"resourceType": "MedicationStatement",
"id": "20189",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:31.896+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:28.766 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:28.768 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:28.768 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8inac9YMtgyIgkW5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20189/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20189/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:28.768 [print] {
"resourceType": "MedicationStatement",
"id": "20189",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:31.896+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:28.768 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:29.652 [print] {
"resourceType": "MedicationStatement",
"id": "20189",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:31.896+02:00",
"source": "#8inac9YMtgyIgkW5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:30.266 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:30.895 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:33.396+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:33.396+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:30.896 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:31.523 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:31.523 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n3T0sE3S82oi4lfB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20190/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20190/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:31.523 [print] {
"resourceType": "MedicationStatement",
"id": "20190",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:34.655+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:31.523 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:31.524 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:31.524 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n3T0sE3S82oi4lfB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20190/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20190/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:31.524 [print] {
"resourceType": "MedicationStatement",
"id": "20190",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:34.655+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:31.524 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:32.140 [print] {
"resourceType": "MedicationStatement",
"id": "20190",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:34.655+02:00",
"source": "#n3T0sE3S82oi4lfB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:32.746 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:33.367 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:35.882+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:35.882+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:33.369 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:33.990 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:33.990 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qWIpPQsRmop2Bvd8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20191/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20191/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:33.990 [print] {
"resourceType": "MedicationStatement",
"id": "20191",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:37.117+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:33.990 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:33.991 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:33.991 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qWIpPQsRmop2Bvd8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20191/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20191/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:33.991 [print] {
"resourceType": "MedicationStatement",
"id": "20191",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:37.117+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:33.991 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:34.623 [print] {
"resourceType": "MedicationStatement",
"id": "20191",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:37.117+02:00",
"source": "#qWIpPQsRmop2Bvd8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:35.220 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:35.810 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:38.353+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:38.353+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:35.812 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:36.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:36.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gisJ00q55AYboPie"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20192/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20192/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:36.415 [print] {
"resourceType": "MedicationStatement",
"id": "20192",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:39.551+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:36.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:36.416 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:36.416 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gisJ00q55AYboPie"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20192/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20192/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:36.416 [print] {
"resourceType": "MedicationStatement",
"id": "20192",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:39.551+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:36.416 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:38.041 [print] {
"resourceType": "MedicationStatement",
"id": "20192",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:39.551+02:00",
"source": "#gisJ00q55AYboPie",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:38.669 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:39.269 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:41.800+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:41.800+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:39.270 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:39.881 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:39.881 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"72nZesitKNPg4i1Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20193/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20193/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:39.881 [print] {
"resourceType": "MedicationStatement",
"id": "20193",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:42.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:39.881 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:39.883 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:39.883 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"72nZesitKNPg4i1Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20193/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20193/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:39.883 [print] {
"resourceType": "MedicationStatement",
"id": "20193",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:42.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:39.883 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:40.477 [print] {
"resourceType": "MedicationStatement",
"id": "20193",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:42.996+02:00",
"source": "#72nZesitKNPg4i1Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:41.094 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:41.721 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:44.226+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:44.226+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:41.723 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:42.395 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:42.395 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MlYnSXtR5l7U6WuY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20194/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20194/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:42.395 [print] {
"resourceType": "MedicationStatement",
"id": "20194",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:45.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:42.395 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:42.397 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:42.397 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MlYnSXtR5l7U6WuY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20194/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20194/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:42.397 [print] {
"resourceType": "MedicationStatement",
"id": "20194",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:45.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:42.397 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:42.989 [print] {
"resourceType": "MedicationStatement",
"id": "20194",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:45.519+02:00",
"source": "#MlYnSXtR5l7U6WuY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:43.611 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:44.211 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:46.746+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:46.746+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:44.212 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:44.856 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:44.856 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lt0xcoR3jeQ5mKaY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20195/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20195/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:44.856 [print] {
"resourceType": "MedicationStatement",
"id": "20195",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:47.974+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:44.856 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:44.858 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:44.858 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lt0xcoR3jeQ5mKaY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20195/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20195/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:44.858 [print] {
"resourceType": "MedicationStatement",
"id": "20195",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:47.974+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:44.858 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:45.482 [print] {
"resourceType": "MedicationStatement",
"id": "20195",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:47.974+02:00",
"source": "#lt0xcoR3jeQ5mKaY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:46.115 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:46.729 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:49.251+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:49.251+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:46.730 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:47.627 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:47.627 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I3XAN73k6Iu6C5Mz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20196/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20196/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:47.627 [print] {
"resourceType": "MedicationStatement",
"id": "20196",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:50.759+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:47.627 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:47.628 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:47.628 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I3XAN73k6Iu6C5Mz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20196/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20196/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:47.628 [print] {
"resourceType": "MedicationStatement",
"id": "20196",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:50.759+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:47.628 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:48.255 [print] {
"resourceType": "MedicationStatement",
"id": "20196",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:50.759+02:00",
"source": "#I3XAN73k6Iu6C5Mz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:48.881 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:49.520 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:52.015+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:52.015+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:49.521 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:50.176 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:50.176 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tGnvWsh7EqbTDw6Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20197/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20197/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:50.176 [print] {
"resourceType": "MedicationStatement",
"id": "20197",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:53.292+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:50.176 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:50.178 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:50.178 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tGnvWsh7EqbTDw6Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20197/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20197/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:50.178 [print] {
"resourceType": "MedicationStatement",
"id": "20197",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:53.292+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:50.178 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:50.794 [print] {
"resourceType": "MedicationStatement",
"id": "20197",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:53.292+02:00",
"source": "#tGnvWsh7EqbTDw6Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:51.401 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:51.994 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:54.535+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:54.535+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:51.996 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:52.693 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:52.693 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ekQE9dmls1fFLAEd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20198/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20198/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:52.693 [print] {
"resourceType": "MedicationStatement",
"id": "20198",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:55.807+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:52.693 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:52.694 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:52.694 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ekQE9dmls1fFLAEd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20198/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20198/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:52.694 [print] {
"resourceType": "MedicationStatement",
"id": "20198",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:55.807+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:52.694 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:53.308 [print] {
"resourceType": "MedicationStatement",
"id": "20198",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:55.807+02:00",
"source": "#ekQE9dmls1fFLAEd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:53.944 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:54.534 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:57.082+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:57.082+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:54.535 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:55.202 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:55.202 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DtRXBy9SqTDexMkP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20199/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20199/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:55.202 [print] {
"resourceType": "MedicationStatement",
"id": "20199",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:58.280+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:55.202 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:55.204 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:55.204 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DtRXBy9SqTDexMkP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20199/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:56:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20199/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:56:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:55.204 [print] {
"resourceType": "MedicationStatement",
"id": "20199",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:58.280+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:55.204 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:55.801 [print] {
"resourceType": "MedicationStatement",
"id": "20199",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:56:58.280+02:00",
"source": "#DtRXBy9SqTDexMkP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:56.421 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:56:57.036 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:56:59.554+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:56:59.554+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:56:57.041 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:57.640 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:57.640 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QNQ4YizHtpqNcp2u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20200/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20200/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:57.640 [print] {
"resourceType": "MedicationStatement",
"id": "20200",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:00.771+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:57.640 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:56:57.642 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:56:57.642 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QNQ4YizHtpqNcp2u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20200/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20200/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:56:57.642 [print] {
"resourceType": "MedicationStatement",
"id": "20200",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:00.771+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:56:57.642 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:56:59.259 [print] {
"resourceType": "MedicationStatement",
"id": "20200",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:00.771+02:00",
"source": "#QNQ4YizHtpqNcp2u",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:56:59.876 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:00.472 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:03.011+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:03.011+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:00.473 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:01.118 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:01.118 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ye2AzULBBEtdHoUb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20201/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20201/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:01.118 [print] {
"resourceType": "MedicationStatement",
"id": "20201",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:04.224+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:01.118 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:01.120 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:01.120 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ye2AzULBBEtdHoUb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20201/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20201/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:01.121 [print] {
"resourceType": "MedicationStatement",
"id": "20201",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:04.224+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:01.121 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:01.722 [print] {
"resourceType": "MedicationStatement",
"id": "20201",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:04.224+02:00",
"source": "#ye2AzULBBEtdHoUb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:02.327 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:02.948 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:05.462+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:05.462+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:02.950 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:03.563 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:03.563 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eO3Xhzq9ge6WD9Vc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20202/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20202/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:03.563 [print] {
"resourceType": "MedicationStatement",
"id": "20202",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:06.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:03.563 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:03.564 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:03.564 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eO3Xhzq9ge6WD9Vc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20202/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20202/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:03.564 [print] {
"resourceType": "MedicationStatement",
"id": "20202",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:06.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:03.564 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:04.180 [print] {
"resourceType": "MedicationStatement",
"id": "20202",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:06.690+02:00",
"source": "#eO3Xhzq9ge6WD9Vc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:04.802 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:05.413 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:07.937+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:07.937+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:05.413 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:06.002 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:06.002 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2aV1ZrHlcNNXbDqW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20203/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20203/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:06.002 [print] {
"resourceType": "MedicationStatement",
"id": "20203",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:09.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:06.002 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:06.003 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:06.004 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2aV1ZrHlcNNXbDqW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20203/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20203/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:06.004 [print] {
"resourceType": "MedicationStatement",
"id": "20203",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:09.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:06.004 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:06.625 [print] {
"resourceType": "MedicationStatement",
"id": "20203",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:09.136+02:00",
"source": "#2aV1ZrHlcNNXbDqW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:07.239 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:07.847 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:10.376+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:10.376+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:07.849 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:08.454 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:08.454 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wurHuTv4miAmeTgb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20204/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20204/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:08.454 [print] {
"resourceType": "MedicationStatement",
"id": "20204",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:11.584+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:08.454 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:08.456 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:08.456 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wurHuTv4miAmeTgb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20204/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20204/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:08.456 [print] {
"resourceType": "MedicationStatement",
"id": "20204",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:11.584+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:08.456 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:09.058 [print] {
"resourceType": "MedicationStatement",
"id": "20204",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:11.584+02:00",
"source": "#wurHuTv4miAmeTgb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:09.682 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:10.294 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:12.811+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:12.811+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:10.295 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:10.954 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:10.954 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PxaDd6CTTJbgbbbs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20205/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20205/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:10.954 [print] {
"resourceType": "MedicationStatement",
"id": "20205",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:14.091+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:10.954 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:10.956 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:10.956 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PxaDd6CTTJbgbbbs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20205/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20205/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:10.956 [print] {
"resourceType": "MedicationStatement",
"id": "20205",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:14.091+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:10.956 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:11.550 [print] {
"resourceType": "MedicationStatement",
"id": "20205",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:14.091+02:00",
"source": "#PxaDd6CTTJbgbbbs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:12.165 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:12.802 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:15.299+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:15.299+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:12.803 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:13.605 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:13.605 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8m62csyX4fEnaRhz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20206/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20206/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:13.605 [print] {
"resourceType": "MedicationStatement",
"id": "20206",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:16.536+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:13.605 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:13.607 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:13.607 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8m62csyX4fEnaRhz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20206/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20206/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:13.607 [print] {
"resourceType": "MedicationStatement",
"id": "20206",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:16.536+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:13.607 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:14.319 [print] {
"resourceType": "MedicationStatement",
"id": "20206",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:16.536+02:00",
"source": "#8m62csyX4fEnaRhz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:14.923 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:15.514 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:18.058+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:18.058+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:15.515 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:16.126 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:16.126 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DCGomZi0iqzRhyW4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20207/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20207/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:16.126 [print] {
"resourceType": "MedicationStatement",
"id": "20207",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:19.253+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:16.126 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:16.128 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:16.128 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DCGomZi0iqzRhyW4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20207/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20207/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:16.128 [print] {
"resourceType": "MedicationStatement",
"id": "20207",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:19.253+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:16.128 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:17.736 [print] {
"resourceType": "MedicationStatement",
"id": "20207",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:19.253+02:00",
"source": "#DCGomZi0iqzRhyW4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:18.334 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:18.952 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:21.470+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:21.470+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:18.954 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:19.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:19.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJFH2hF8w1oemD2F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20208/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20208/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:19.553 [print] {
"resourceType": "MedicationStatement",
"id": "20208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:22.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:19.553 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:19.555 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:19.555 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJFH2hF8w1oemD2F"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20208/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20208/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:19.555 [print] {
"resourceType": "MedicationStatement",
"id": "20208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:22.682+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:19.555 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:20.164 [print] {
"resourceType": "MedicationStatement",
"id": "20208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:22.682+02:00",
"source": "#KJFH2hF8w1oemD2F",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:21.071 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:21.665 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:24.202+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:24.202+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:21.667 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:22.274 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:22.274 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p7QhzxOnnGQMiZ5O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20209/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20209/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:22.274 [print] {
"resourceType": "MedicationStatement",
"id": "20209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:25.408+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:22.274 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:22.276 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:22.276 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p7QhzxOnnGQMiZ5O"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20209/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20209/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:22.276 [print] {
"resourceType": "MedicationStatement",
"id": "20209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:25.408+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:22.276 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:22.877 [print] {
"resourceType": "MedicationStatement",
"id": "20209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:25.408+02:00",
"source": "#p7QhzxOnnGQMiZ5O",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:23.484 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:24.131 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:26.621+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:26.621+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:24.132 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:24.744 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:24.744 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qC3IoISz8Jvcr3ah"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20210/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20210/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:24.744 [print] {
"resourceType": "MedicationStatement",
"id": "20210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:27.875+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:24.744 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:24.746 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:24.746 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qC3IoISz8Jvcr3ah"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20210/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20210/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:24.746 [print] {
"resourceType": "MedicationStatement",
"id": "20210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:27.875+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:24.746 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:25.343 [print] {
"resourceType": "MedicationStatement",
"id": "20210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:27.875+02:00",
"source": "#qC3IoISz8Jvcr3ah",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:25.951 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:26.562 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:29.086+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:29.086+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:26.563 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:27.170 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:27.170 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JPLicS8t47vtraU2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20211/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20211/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:27.170 [print] {
"resourceType": "MedicationStatement",
"id": "20211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:30.305+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:27.170 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:27.171 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:27.171 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JPLicS8t47vtraU2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20211/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20211/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:27.171 [print] {
"resourceType": "MedicationStatement",
"id": "20211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:30.305+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:27.171 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:27.784 [print] {
"resourceType": "MedicationStatement",
"id": "20211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:30.305+02:00",
"source": "#JPLicS8t47vtraU2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:28.608 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:30.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:31.740+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:31.740+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:30.509 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:31.115 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:31.115 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MCRwsQyeeIcjAPt5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20212/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20212/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:31.115 [print] {
"resourceType": "MedicationStatement",
"id": "20212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:34.252+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:31.115 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:31.116 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:31.116 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MCRwsQyeeIcjAPt5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20212/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20212/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:31.116 [print] {
"resourceType": "MedicationStatement",
"id": "20212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:34.252+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:31.116 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:31.724 [print] {
"resourceType": "MedicationStatement",
"id": "20212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:34.252+02:00",
"source": "#MCRwsQyeeIcjAPt5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:32.340 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:32.982 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:35.478+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:35.478+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:32.983 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:33.586 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:33.586 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V8UhuLgW04DjEgww"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20213/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20213/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:33.586 [print] {
"resourceType": "MedicationStatement",
"id": "20213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:36.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:33.586 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:33.588 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:33.588 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V8UhuLgW04DjEgww"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20213/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20213/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:33.588 [print] {
"resourceType": "MedicationStatement",
"id": "20213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:36.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:33.588 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:35.183 [print] {
"resourceType": "MedicationStatement",
"id": "20213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:36.722+02:00",
"source": "#V8UhuLgW04DjEgww",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:35.791 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:36.687 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:38.929+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:38.929+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:36.689 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:37.285 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:37.285 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CgAXTmGHJWgVkoY1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20214/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20214/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:37.286 [print] {
"resourceType": "MedicationStatement",
"id": "20214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:40.417+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:37.286 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:37.287 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:37.287 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CgAXTmGHJWgVkoY1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20214/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20214/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:37.287 [print] {
"resourceType": "MedicationStatement",
"id": "20214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:40.417+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:37.287 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:37.893 [print] {
"resourceType": "MedicationStatement",
"id": "20214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:40.417+02:00",
"source": "#CgAXTmGHJWgVkoY1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:38.514 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:39.111 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:41.650+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:41.650+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:39.113 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:39.742 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:39.742 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"33iRFJ2OpnhIpS3M"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20215/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20215/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:39.742 [print] {
"resourceType": "MedicationStatement",
"id": "20215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:42.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:39.742 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:39.743 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:39.743 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"33iRFJ2OpnhIpS3M"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20215/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20215/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:39.743 [print] {
"resourceType": "MedicationStatement",
"id": "20215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:42.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:39.743 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:40.350 [print] {
"resourceType": "MedicationStatement",
"id": "20215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:42.879+02:00",
"source": "#33iRFJ2OpnhIpS3M",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:41.247 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:41.851 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:44.365+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:44.365+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:41.852 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:43.666 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:43.666 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7KxcdWkdcuInIzjs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20216/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20216/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:43.666 [print] {
"resourceType": "MedicationStatement",
"id": "20216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:46.801+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:43.666 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:43.668 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:43.668 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7KxcdWkdcuInIzjs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20216/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20216/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:43.668 [print] {
"resourceType": "MedicationStatement",
"id": "20216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:46.801+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:43.668 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:44.252 [print] {
"resourceType": "MedicationStatement",
"id": "20216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:46.801+02:00",
"source": "#7KxcdWkdcuInIzjs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:44.856 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:45.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:47.990+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:47.990+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:45.462 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:46.083 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:46.083 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t3T5MLbSmPJvyLwp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20217/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20217/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:46.084 [print] {
"resourceType": "MedicationStatement",
"id": "20217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:49.199+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:46.084 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:46.085 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:46.085 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t3T5MLbSmPJvyLwp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20217/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20217/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:46.085 [print] {
"resourceType": "MedicationStatement",
"id": "20217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:49.199+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:46.085 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:46.708 [print] {
"resourceType": "MedicationStatement",
"id": "20217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:49.199+02:00",
"source": "#t3T5MLbSmPJvyLwp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:47.324 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:47.928 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:50.460+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:50.460+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:47.929 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:48.538 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:48.538 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8taMTDDW4sapWxI5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20218/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20218/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:48.538 [print] {
"resourceType": "MedicationStatement",
"id": "20218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:51.668+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:48.538 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:48.540 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:48.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8taMTDDW4sapWxI5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20218/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20218/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:48.540 [print] {
"resourceType": "MedicationStatement",
"id": "20218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:51.668+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:48.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:49.328 [print] {
"resourceType": "MedicationStatement",
"id": "20218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:51.668+02:00",
"source": "#8taMTDDW4sapWxI5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:49.929 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:50.550 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:53.062+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:53.062+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:50.551 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:51.160 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:51.160 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rGPg67uhZkub6RdH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20219/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20219/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:51.160 [print] {
"resourceType": "MedicationStatement",
"id": "20219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:54.281+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:51.160 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:51.162 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:51.162 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rGPg67uhZkub6RdH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20219/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20219/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:51.162 [print] {
"resourceType": "MedicationStatement",
"id": "20219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:54.281+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:51.162 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:52.016 [print] {
"resourceType": "MedicationStatement",
"id": "20219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:54.281+02:00",
"source": "#rGPg67uhZkub6RdH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:52.657 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:53.250 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:55.786+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:55.786+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:53.251 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:53.873 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:53.873 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ULeTT3x82QforarZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20220/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20220/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:53.873 [print] {
"resourceType": "MedicationStatement",
"id": "20220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:57.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:53.873 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:53.874 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:53.874 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ULeTT3x82QforarZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20220/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20220/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:53.874 [print] {
"resourceType": "MedicationStatement",
"id": "20220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:57.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:53.874 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:54.767 [print] {
"resourceType": "MedicationStatement",
"id": "20220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:57.010+02:00",
"source": "#ULeTT3x82QforarZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:55.374 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:56.018 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:57:58.510+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:57:58.510+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:56.021 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:56.666 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:56.666 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zuFqw5CYER4V9zqk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20221/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20221/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:56.666 [print] {
"resourceType": "MedicationStatement",
"id": "20221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:59.794+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:56.666 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:56.667 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:56.667 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zuFqw5CYER4V9zqk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20221/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:57:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20221/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:57:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:56.667 [print] {
"resourceType": "MedicationStatement",
"id": "20221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:59.794+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:56.667 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:57.271 [print] {
"resourceType": "MedicationStatement",
"id": "20221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:57:59.794+02:00",
"source": "#zuFqw5CYER4V9zqk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:57:57.918 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 23ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 23ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:57:58.558 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:01.040+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:01.040+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:57:58.559 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:59.192 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:59.192 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Xcf3eVHxNd1qrWoZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20222/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20222/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:59.192 [print] {
"resourceType": "MedicationStatement",
"id": "20222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:02.321+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:59.192 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:57:59.193 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:57:59.193 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Xcf3eVHxNd1qrWoZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20222/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20222/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:57:59.193 [print] {
"resourceType": "MedicationStatement",
"id": "20222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:02.321+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:57:59.193 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:57:59.887 [print] {
"resourceType": "MedicationStatement",
"id": "20222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:02.321+02:00",
"source": "#Xcf3eVHxNd1qrWoZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:00.499 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:01.124 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:03.620+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:03.620+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:01.125 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:01.721 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:01.721 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vpSNLf6r6jaR5INq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20223/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20223/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:01.721 [print] {
"resourceType": "MedicationStatement",
"id": "20223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:04.859+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:01.721 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:01.723 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:01.723 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vpSNLf6r6jaR5INq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20223/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20223/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:01.723 [print] {
"resourceType": "MedicationStatement",
"id": "20223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:04.859+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:01.723 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:02.351 [print] {
"resourceType": "MedicationStatement",
"id": "20223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:04.859+02:00",
"source": "#vpSNLf6r6jaR5INq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:04.160 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:05.251 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:07.100+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:07.100+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:05.252 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:06.102 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:06.102 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lIp2RV6AbHNpuv3Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20224/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20224/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:06.102 [print] {
"resourceType": "MedicationStatement",
"id": "20224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:09.234+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:06.102 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:06.104 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:06.104 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lIp2RV6AbHNpuv3Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20224/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20224/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:06.104 [print] {
"resourceType": "MedicationStatement",
"id": "20224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:09.234+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:06.104 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:06.733 [print] {
"resourceType": "MedicationStatement",
"id": "20224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:09.234+02:00",
"source": "#lIp2RV6AbHNpuv3Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:07.361 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:07.964 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:10.497+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:10.497+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:07.965 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:08.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:08.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ntgu7reLDnO1eh9U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20225/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20225/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:08.568 [print] {
"resourceType": "MedicationStatement",
"id": "20225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:11.707+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:08.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:08.570 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:08.570 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ntgu7reLDnO1eh9U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20225/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20225/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:08.570 [print] {
"resourceType": "MedicationStatement",
"id": "20225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:11.707+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:08.570 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:09.160 [print] {
"resourceType": "MedicationStatement",
"id": "20225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:11.707+02:00",
"source": "#Ntgu7reLDnO1eh9U",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:09.791 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:10.408 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:12.913+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:12.913+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:10.409 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:11.013 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:11.013 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"isPIhoxIvNJQya1D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20226/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20226/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:11.013 [print] {
"resourceType": "MedicationStatement",
"id": "20226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:14.147+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:11.013 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:11.014 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:11.014 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"isPIhoxIvNJQya1D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20226/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20226/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:11.014 [print] {
"resourceType": "MedicationStatement",
"id": "20226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:14.147+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:11.014 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:11.609 [print] {
"resourceType": "MedicationStatement",
"id": "20226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:14.147+02:00",
"source": "#isPIhoxIvNJQya1D",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:12.216 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:12.807 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:15.354+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:15.354+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:12.809 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:13.645 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:13.645 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qhuSOneCQq2ofFVf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20227/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20227/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:13.645 [print] {
"resourceType": "MedicationStatement",
"id": "20227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:16.783+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:13.646 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:13.647 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:13.647 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qhuSOneCQq2ofFVf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20227/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20227/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:13.647 [print] {
"resourceType": "MedicationStatement",
"id": "20227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:16.783+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:13.647 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:14.247 [print] {
"resourceType": "MedicationStatement",
"id": "20227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:16.783+02:00",
"source": "#qhuSOneCQq2ofFVf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:14.869 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:15.487 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:18.007+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:18.007+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:15.488 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:17.158 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:17.159 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Otb5YefUjo0XGMeG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20228/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20228/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:17.159 [print] {
"resourceType": "MedicationStatement",
"id": "20228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:20.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:17.159 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:17.160 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:17.160 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Otb5YefUjo0XGMeG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20228/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20228/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:17.160 [print] {
"resourceType": "MedicationStatement",
"id": "20228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:20.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:17.160 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:17.769 [print] {
"resourceType": "MedicationStatement",
"id": "20228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:20.272+02:00",
"source": "#Otb5YefUjo0XGMeG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:18.433 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:19.047 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:21.566+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:21.566+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:19.048 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:19.649 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:19.649 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UVZqAytmqyCA1iE9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20229/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20229/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:19.649 [print] {
"resourceType": "MedicationStatement",
"id": "20229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:22.786+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:19.649 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:19.650 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:19.650 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UVZqAytmqyCA1iE9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20229/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20229/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:19.650 [print] {
"resourceType": "MedicationStatement",
"id": "20229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:22.786+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:19.650 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:20.289 [print] {
"resourceType": "MedicationStatement",
"id": "20229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:22.786+02:00",
"source": "#UVZqAytmqyCA1iE9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:20.909 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:21.515 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:24.048+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:24.048+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:21.516 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:22.135 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:22.135 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DoMKF85IhI9fiEQD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20230/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20230/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:22.135 [print] {
"resourceType": "MedicationStatement",
"id": "20230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:25.274+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:22.135 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:22.136 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:22.136 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DoMKF85IhI9fiEQD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20230/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20230/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:22.136 [print] {
"resourceType": "MedicationStatement",
"id": "20230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:25.274+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:22.136 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:22.754 [print] {
"resourceType": "MedicationStatement",
"id": "20230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:25.274+02:00",
"source": "#DoMKF85IhI9fiEQD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:23.398 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:24.022 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:26.536+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:26.536+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:24.023 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:24.675 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:24.675 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pgKVzB05GI8E0GB3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20231/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20231/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:24.675 [print] {
"resourceType": "MedicationStatement",
"id": "20231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:27.811+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:24.675 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:24.676 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:24.676 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pgKVzB05GI8E0GB3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20231/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20231/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:24.676 [print] {
"resourceType": "MedicationStatement",
"id": "20231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:27.811+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:24.676 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:25.322 [print] {
"resourceType": "MedicationStatement",
"id": "20231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:27.811+02:00",
"source": "#pgKVzB05GI8E0GB3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:25.936 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:26.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:29.076+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:29.076+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:26.842 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:27.497 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:27.497 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0pAlYq5onvY4HH0Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20232/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20232/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:27.497 [print] {
"resourceType": "MedicationStatement",
"id": "20232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:30.604+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:27.497 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:27.498 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:27.498 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0pAlYq5onvY4HH0Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20232/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20232/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:27.498 [print] {
"resourceType": "MedicationStatement",
"id": "20232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:30.604+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:27.498 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:28.119 [print] {
"resourceType": "MedicationStatement",
"id": "20232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:30.604+02:00",
"source": "#0pAlYq5onvY4HH0Z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:28.739 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:29.344 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:31.876+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:31.876+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:29.346 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:29.966 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:29.966 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kgQXkWrp1GaIoZp8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20233/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20233/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:29.966 [print] {
"resourceType": "MedicationStatement",
"id": "20233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:33.098+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:29.966 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:29.968 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:29.968 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kgQXkWrp1GaIoZp8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20233/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20233/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:29.968 [print] {
"resourceType": "MedicationStatement",
"id": "20233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:33.098+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:29.968 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:30.600 [print] {
"resourceType": "MedicationStatement",
"id": "20233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:33.098+02:00",
"source": "#kgQXkWrp1GaIoZp8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:31.219 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:31.826 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:34.355+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:34.355+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:31.828 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:32.450 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:32.450 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XjK9wSN9VEEhQZH2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20234/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20234/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:32.450 [print] {
"resourceType": "MedicationStatement",
"id": "20234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:35.574+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:32.450 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:32.451 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:32.451 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XjK9wSN9VEEhQZH2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20234/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20234/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:32.451 [print] {
"resourceType": "MedicationStatement",
"id": "20234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:35.574+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:32.451 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:33.054 [print] {
"resourceType": "MedicationStatement",
"id": "20234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:35.574+02:00",
"source": "#XjK9wSN9VEEhQZH2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:33.711 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:34.292 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:36.843+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:36.843+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:34.294 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:34.891 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:34.891 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ijHgf6Tcq1PQx8CF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20235/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20235/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:34.891 [print] {
"resourceType": "MedicationStatement",
"id": "20235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:38.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:34.891 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:34.892 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:34.892 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ijHgf6Tcq1PQx8CF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20235/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20235/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:34.892 [print] {
"resourceType": "MedicationStatement",
"id": "20235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:38.031+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:34.893 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:35.484 [print] {
"resourceType": "MedicationStatement",
"id": "20235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:38.031+02:00",
"source": "#ijHgf6Tcq1PQx8CF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:36.082 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:36.733 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:39.223+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:39.223+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:36.734 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:37.338 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:37.338 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xrw80RHt0HwkLQEm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20236/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20236/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:37.339 [print] {
"resourceType": "MedicationStatement",
"id": "20236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:40.480+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:37.339 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:37.340 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:37.340 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xrw80RHt0HwkLQEm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20236/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20236/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:37.340 [print] {
"resourceType": "MedicationStatement",
"id": "20236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:40.480+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:37.340 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:37.934 [print] {
"resourceType": "MedicationStatement",
"id": "20236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:40.480+02:00",
"source": "#xrw80RHt0HwkLQEm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:38.827 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:39.456 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:41.964+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:41.964+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:39.457 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:40.092 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:40.092 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oSqU85TY3F8vaxrk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20237/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20237/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:40.092 [print] {
"resourceType": "MedicationStatement",
"id": "20237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:43.226+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:40.092 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:40.094 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:40.094 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oSqU85TY3F8vaxrk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20237/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20237/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:40.094 [print] {
"resourceType": "MedicationStatement",
"id": "20237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:43.226+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:40.094 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:40.697 [print] {
"resourceType": "MedicationStatement",
"id": "20237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:43.226+02:00",
"source": "#oSqU85TY3F8vaxrk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:41.383 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:41.980 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:44.513+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:44.513+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:41.981 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:42.641 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:42.641 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IwYzZGfJCFmcV8Sh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20238/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20238/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:42.641 [print] {
"resourceType": "MedicationStatement",
"id": "20238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:45.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:42.641 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:42.642 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:42.642 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IwYzZGfJCFmcV8Sh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20238/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20238/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:42.642 [print] {
"resourceType": "MedicationStatement",
"id": "20238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:45.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:42.642 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:43.335 [print] {
"resourceType": "MedicationStatement",
"id": "20238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:45.761+02:00",
"source": "#IwYzZGfJCFmcV8Sh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:43.951 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:44.542 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:47.091+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:47.091+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:44.543 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:45.173 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:45.173 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bu6KJvR9CCip4xOB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20239/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20239/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:45.173 [print] {
"resourceType": "MedicationStatement",
"id": "20239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:48.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:45.173 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:45.174 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:45.174 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bu6KJvR9CCip4xOB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20239/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20239/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:45.174 [print] {
"resourceType": "MedicationStatement",
"id": "20239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:48.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:45.174 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:45.776 [print] {
"resourceType": "MedicationStatement",
"id": "20239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:48.310+02:00",
"source": "#Bu6KJvR9CCip4xOB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:46.398 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:47.001 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:49.530+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:49.530+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:47.003 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:47.618 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:47.618 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a3SpIg2HNlQjf735"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20240/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20240/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:47.618 [print] {
"resourceType": "MedicationStatement",
"id": "20240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:50.754+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:47.618 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:47.619 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:47.619 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"a3SpIg2HNlQjf735"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20240/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20240/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:47.619 [print] {
"resourceType": "MedicationStatement",
"id": "20240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:50.754+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:47.619 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:48.222 [print] {
"resourceType": "MedicationStatement",
"id": "20240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:50.754+02:00",
"source": "#a3SpIg2HNlQjf735",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:48.849 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:49.436 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:51.980+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:51.980+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:49.437 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:50.047 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:50.047 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w6l1h5YN3wAllDMP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20241/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20241/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:50.047 [print] {
"resourceType": "MedicationStatement",
"id": "20241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:53.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:50.047 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:50.049 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:50.049 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w6l1h5YN3wAllDMP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20241/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20241/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:50.049 [print] {
"resourceType": "MedicationStatement",
"id": "20241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:53.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:50.049 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:50.646 [print] {
"resourceType": "MedicationStatement",
"id": "20241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:53.186+02:00",
"source": "#w6l1h5YN3wAllDMP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:51.256 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:51.863 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:54.393+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:54.393+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:51.864 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:52.466 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:52.466 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XTWddFhrVmGBvGfH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20242/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20242/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:52.466 [print] {
"resourceType": "MedicationStatement",
"id": "20242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:55.605+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:52.466 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:52.467 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:52.467 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XTWddFhrVmGBvGfH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20242/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20242/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:52.467 [print] {
"resourceType": "MedicationStatement",
"id": "20242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:55.605+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:52.467 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:53.080 [print] {
"resourceType": "MedicationStatement",
"id": "20242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:55.605+02:00",
"source": "#XTWddFhrVmGBvGfH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:53.687 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:54.303 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:56.826+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:56.826+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:54.304 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:54.901 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:54.901 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2HmInDJq0QDc7flV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20243/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20243/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:54.901 [print] {
"resourceType": "MedicationStatement",
"id": "20243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:58.041+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:54.901 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:54.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:54.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2HmInDJq0QDc7flV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20243/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:58:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20243/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:58:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:54.902 [print] {
"resourceType": "MedicationStatement",
"id": "20243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:58.041+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:54.902 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:55.502 [print] {
"resourceType": "MedicationStatement",
"id": "20243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:58:58.041+02:00",
"source": "#2HmInDJq0QDc7flV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:56.118 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:56.724 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:58:59.257+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:58:59.257+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:56.726 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:57.385 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:57.385 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EE79tqKfP55xJtFL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20244/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20244/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:57.385 [print] {
"resourceType": "MedicationStatement",
"id": "20244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:00.495+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:57.385 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:57.386 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:57.386 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EE79tqKfP55xJtFL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20244/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20244/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:57.386 [print] {
"resourceType": "MedicationStatement",
"id": "20244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:00.495+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:57.386 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:58:57.993 [print] {
"resourceType": "MedicationStatement",
"id": "20244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:00.495+02:00",
"source": "#EE79tqKfP55xJtFL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:58:58.630 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:58:59.251 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:01.762+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:01.762+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:58:59.252 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:59.855 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:59.855 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4bPNGr0XW183msqe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20245/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20245/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:59.855 [print] {
"resourceType": "MedicationStatement",
"id": "20245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:02.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:59.855 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:58:59.856 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:58:59.856 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4bPNGr0XW183msqe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20245/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20245/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:58:59.856 [print] {
"resourceType": "MedicationStatement",
"id": "20245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:02.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:58:59.856 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:00.486 [print] {
"resourceType": "MedicationStatement",
"id": "20245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:02.996+02:00",
"source": "#4bPNGr0XW183msqe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:01.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:01.763 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:04.271+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:04.271+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:01.764 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:02.377 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:02.377 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v560UQrthi9W4Zr9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20246/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20246/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:02.377 [print] {
"resourceType": "MedicationStatement",
"id": "20246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:05.508+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:02.377 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:02.378 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:02.378 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v560UQrthi9W4Zr9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20246/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20246/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:02.378 [print] {
"resourceType": "MedicationStatement",
"id": "20246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:05.508+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:02.378 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:03.002 [print] {
"resourceType": "MedicationStatement",
"id": "20246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:05.508+02:00",
"source": "#v560UQrthi9W4Zr9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:03.658 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:04.247 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:06.796+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:06.796+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:04.248 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:04.861 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:04.861 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pap93zNSiBw7GVqN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20247/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20247/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:04.861 [print] {
"resourceType": "MedicationStatement",
"id": "20247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:07.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:04.861 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:04.863 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:04.863 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pap93zNSiBw7GVqN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20247/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20247/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:04.863 [print] {
"resourceType": "MedicationStatement",
"id": "20247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:07.996+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:04.863 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:05.484 [print] {
"resourceType": "MedicationStatement",
"id": "20247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:07.996+02:00",
"source": "#pap93zNSiBw7GVqN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:06.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:06.741 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:09.268+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:09.268+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:06.742 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:07.350 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:07.350 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qyqfbRyQhZ8TJik4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20248/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20248/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:07.350 [print] {
"resourceType": "MedicationStatement",
"id": "20248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:10.490+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:07.350 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:07.352 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:07.352 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qyqfbRyQhZ8TJik4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20248/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20248/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:07.352 [print] {
"resourceType": "MedicationStatement",
"id": "20248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:10.490+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:07.352 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:08.006 [print] {
"resourceType": "MedicationStatement",
"id": "20248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:10.490+02:00",
"source": "#qyqfbRyQhZ8TJik4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:08.619 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:09.221 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:11.760+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:11.760+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:09.222 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:09.843 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:09.843 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lTqLr2phDA5uVueX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20249/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20249/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:09.843 [print] {
"resourceType": "MedicationStatement",
"id": "20249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:12.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:09.843 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:09.844 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:09.844 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lTqLr2phDA5uVueX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20249/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20249/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:09.844 [print] {
"resourceType": "MedicationStatement",
"id": "20249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:12.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:09.844 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:10.448 [print] {
"resourceType": "MedicationStatement",
"id": "20249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:12.960+02:00",
"source": "#lTqLr2phDA5uVueX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:11.076 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:11.669 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:14.214+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:14.214+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:11.671 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:12.285 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:12.285 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NMipZPXVsJgLW8IV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20250/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20250/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:12.285 [print] {
"resourceType": "MedicationStatement",
"id": "20250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:15.424+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:12.285 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:12.286 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:12.286 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NMipZPXVsJgLW8IV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20250/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20250/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:12.286 [print] {
"resourceType": "MedicationStatement",
"id": "20250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:15.424+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:12.286 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:12.910 [print] {
"resourceType": "MedicationStatement",
"id": "20250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:15.424+02:00",
"source": "#NMipZPXVsJgLW8IV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:13.526 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:14.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:16.665+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:16.665+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:14.132 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:14.752 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:14.752 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JgUeg48sMxtkNYWh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20251/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20251/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:14.752 [print] {
"resourceType": "MedicationStatement",
"id": "20251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:17.889+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:14.752 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:14.754 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:14.754 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JgUeg48sMxtkNYWh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20251/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20251/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:14.754 [print] {
"resourceType": "MedicationStatement",
"id": "20251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:17.889+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:14.754 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:15.375 [print] {
"resourceType": "MedicationStatement",
"id": "20251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:17.889+02:00",
"source": "#JgUeg48sMxtkNYWh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:16.194 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:16.812 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:19.332+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:19.332+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:16.814 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:17.428 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:17.428 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cwSJbfMeGFRYj788"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20252/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20252/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:17.428 [print] {
"resourceType": "MedicationStatement",
"id": "20252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:20.560+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:17.428 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:17.430 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:17.430 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cwSJbfMeGFRYj788"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20252/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20252/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:17.431 [print] {
"resourceType": "MedicationStatement",
"id": "20252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:20.560+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:17.431 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:18.028 [print] {
"resourceType": "MedicationStatement",
"id": "20252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:20.560+02:00",
"source": "#cwSJbfMeGFRYj788",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:18.670 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:20.290 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:21.799+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:21.799+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:20.292 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:20.916 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:20.916 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TfQMCVMQ4qE4DxJn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20253/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20253/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:20.916 [print] {
"resourceType": "MedicationStatement",
"id": "20253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:24.045+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:20.916 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:20.918 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:20.918 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TfQMCVMQ4qE4DxJn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20253/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20253/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:20.918 [print] {
"resourceType": "MedicationStatement",
"id": "20253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:24.045+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:20.918 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:21.533 [print] {
"resourceType": "MedicationStatement",
"id": "20253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:24.045+02:00",
"source": "#TfQMCVMQ4qE4DxJn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:22.136 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:22.732 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:25.271+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:25.271+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:22.732 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:23.388 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:23.388 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dkDrLIgDEuy7V4oJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20254/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20254/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:23.389 [print] {
"resourceType": "MedicationStatement",
"id": "20254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:26.526+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:23.389 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:23.390 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:23.390 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dkDrLIgDEuy7V4oJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20254/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20254/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:23.390 [print] {
"resourceType": "MedicationStatement",
"id": "20254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:26.526+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:23.390 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:23.989 [print] {
"resourceType": "MedicationStatement",
"id": "20254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:26.526+02:00",
"source": "#dkDrLIgDEuy7V4oJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:24.605 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:25.239 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:27.745+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:27.745+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:25.239 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:25.861 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:25.861 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UMclGiQ8pna1Er1q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20255/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20255/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:25.861 [print] {
"resourceType": "MedicationStatement",
"id": "20255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:29.000+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:25.861 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:25.862 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:25.862 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UMclGiQ8pna1Er1q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20255/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20255/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:25.862 [print] {
"resourceType": "MedicationStatement",
"id": "20255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:29.000+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:25.862 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:26.468 [print] {
"resourceType": "MedicationStatement",
"id": "20255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:29.000+02:00",
"source": "#UMclGiQ8pna1Er1q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:27.065 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:27.687 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:30.207+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:30.207+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:27.688 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:28.495 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:28.496 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i2X2vQTC7PbcU0Fx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20256/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20256/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:28.496 [print] {
"resourceType": "MedicationStatement",
"id": "20256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:31.632+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:28.496 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:28.497 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:28.497 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i2X2vQTC7PbcU0Fx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20256/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20256/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:28.497 [print] {
"resourceType": "MedicationStatement",
"id": "20256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:31.632+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:28.497 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:29.130 [print] {
"resourceType": "MedicationStatement",
"id": "20256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:31.632+02:00",
"source": "#i2X2vQTC7PbcU0Fx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:30.025 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:30.626 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:33.161+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:33.161+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:30.628 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:31.260 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:31.260 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"U8WbTH7rocTUqd1s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20257/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20257/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:31.260 [print] {
"resourceType": "MedicationStatement",
"id": "20257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:34.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:31.260 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:31.261 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:31.261 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"U8WbTH7rocTUqd1s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20257/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20257/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:31.261 [print] {
"resourceType": "MedicationStatement",
"id": "20257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:34.399+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:31.261 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:31.889 [print] {
"resourceType": "MedicationStatement",
"id": "20257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:34.399+02:00",
"source": "#U8WbTH7rocTUqd1s",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:33.512 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:34.116 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:36.646+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:36.646+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:34.118 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:34.742 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:34.742 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bz4zwpv7X0VE95OA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20258/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20258/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:34.742 [print] {
"resourceType": "MedicationStatement",
"id": "20258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:37.875+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:34.742 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:34.744 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:34.744 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bz4zwpv7X0VE95OA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20258/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20258/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:34.744 [print] {
"resourceType": "MedicationStatement",
"id": "20258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:37.875+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:34.744 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:35.622 [print] {
"resourceType": "MedicationStatement",
"id": "20258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:37.875+02:00",
"source": "#bz4zwpv7X0VE95OA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:36.265 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:36.865 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:39.398+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:39.398+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:36.866 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:37.870 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:37.870 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZR7FqiA0f0VEADrt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20259/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20259/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:37.870 [print] {
"resourceType": "MedicationStatement",
"id": "20259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:41.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:37.870 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:37.872 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:37.872 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZR7FqiA0f0VEADrt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20259/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20259/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:37.872 [print] {
"resourceType": "MedicationStatement",
"id": "20259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:41.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:37.872 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:38.473 [print] {
"resourceType": "MedicationStatement",
"id": "20259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:41.006+02:00",
"source": "#ZR7FqiA0f0VEADrt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:39.111 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:39.747 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:42.251+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:42.251+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:39.748 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:40.364 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:40.364 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OpZZIr4oNpKqEUoC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20260/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20260/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:40.364 [print] {
"resourceType": "MedicationStatement",
"id": "20260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:43.497+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:40.364 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:40.365 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:40.365 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OpZZIr4oNpKqEUoC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20260/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20260/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:40.365 [print] {
"resourceType": "MedicationStatement",
"id": "20260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:43.497+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:40.365 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:40.983 [print] {
"resourceType": "MedicationStatement",
"id": "20260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:43.497+02:00",
"source": "#OpZZIr4oNpKqEUoC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:41.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:42.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:44.724+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:44.724+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:42.265 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:42.878 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:42.878 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EAikqKXqqJpH9xu6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20261/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20261/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:42.878 [print] {
"resourceType": "MedicationStatement",
"id": "20261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:46.018+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:42.878 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:42.880 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:42.880 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EAikqKXqqJpH9xu6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20261/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20261/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:42.880 [print] {
"resourceType": "MedicationStatement",
"id": "20261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:46.018+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:42.880 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:43.476 [print] {
"resourceType": "MedicationStatement",
"id": "20261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:46.018+02:00",
"source": "#EAikqKXqqJpH9xu6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:44.086 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:44.684 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:47.226+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:47.226+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:44.685 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:45.313 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:45.313 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sjAQM86tcMMEb5pR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20262/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20262/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:45.313 [print] {
"resourceType": "MedicationStatement",
"id": "20262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:48.451+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:45.313 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:45.314 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:45.314 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sjAQM86tcMMEb5pR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20262/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20262/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:45.314 [print] {
"resourceType": "MedicationStatement",
"id": "20262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:48.451+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:45.314 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:45.925 [print] {
"resourceType": "MedicationStatement",
"id": "20262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:48.451+02:00",
"source": "#sjAQM86tcMMEb5pR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:46.534 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:47.157 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:49.670+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:49.670+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:47.158 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:47.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:47.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TPCbf3zhwXw16FhK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20263/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20263/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:47.779 [print] {
"resourceType": "MedicationStatement",
"id": "20263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:50.908+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:47.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:47.781 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:47.781 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TPCbf3zhwXw16FhK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20263/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20263/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:47.781 [print] {
"resourceType": "MedicationStatement",
"id": "20263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:50.908+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:47.781 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:48.388 [print] {
"resourceType": "MedicationStatement",
"id": "20263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:50.908+02:00",
"source": "#TPCbf3zhwXw16FhK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:49.018 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:49.626 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:52.158+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:52.158+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:49.627 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:50.284 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:50.285 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4fpX6u4jJa2WzDX7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20264/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20264/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:50.285 [print] {
"resourceType": "MedicationStatement",
"id": "20264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:53.419+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:50.285 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:50.286 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:50.286 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4fpX6u4jJa2WzDX7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20264/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20264/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:50.286 [print] {
"resourceType": "MedicationStatement",
"id": "20264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:53.419+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:50.286 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:50.878 [print] {
"resourceType": "MedicationStatement",
"id": "20264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:53.419+02:00",
"source": "#4fpX6u4jJa2WzDX7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:51.515 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:52.130 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:54.634+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:54.634+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:52.132 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:52.796 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:52.796 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F2sXz7Yh9Ifyg1bE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20265/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20265/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:52.796 [print] {
"resourceType": "MedicationStatement",
"id": "20265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:55.936+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:52.796 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:52.797 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:52.797 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F2sXz7Yh9Ifyg1bE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20265/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20265/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:52.797 [print] {
"resourceType": "MedicationStatement",
"id": "20265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:55.936+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:52.797 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:53.490 [print] {
"resourceType": "MedicationStatement",
"id": "20265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:55.936+02:00",
"source": "#F2sXz7Yh9Ifyg1bE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:54.103 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:54.722 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:57.234+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:57.234+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:54.723 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:55.357 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:55.357 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u2uI6SjHKnOLdyPC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20266/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20266/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:55.357 [print] {
"resourceType": "MedicationStatement",
"id": "20266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:58.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:55.357 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:55.358 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:55.358 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"u2uI6SjHKnOLdyPC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20266/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:59:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20266/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:59:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:55.358 [print] {
"resourceType": "MedicationStatement",
"id": "20266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:58.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:55.358 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:55.952 [print] {
"resourceType": "MedicationStatement",
"id": "20266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:59:58.496+02:00",
"source": "#u2uI6SjHKnOLdyPC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:56.598 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:57.225 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:59:59.736+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:59:59.736+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:57.226 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:57.864 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:57.864 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sRUhH6OXrQE9d057"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20267/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20267/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:57.864 [print] {
"resourceType": "MedicationStatement",
"id": "20267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:01.004+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:57.864 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:59:57.865 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:59:57.866 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sRUhH6OXrQE9d057"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20267/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20267/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:59:57.866 [print] {
"resourceType": "MedicationStatement",
"id": "20267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:01.004+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:59:57.866 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:59:58.490 [print] {
"resourceType": "MedicationStatement",
"id": "20267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:01.004+02:00",
"source": "#sRUhH6OXrQE9d057",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:59:59.159 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 21ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 21ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:59:59.808 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:02.293+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:02.293+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:59:59.810 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:01.907 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:01.908 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yPpVvyeJIvfV6TML"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20268/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20268/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:01.908 [print] {
"resourceType": "MedicationStatement",
"id": "20268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:05.040+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:01.908 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:01.909 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:01.909 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yPpVvyeJIvfV6TML"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20268/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20268/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:01.909 [print] {
"resourceType": "MedicationStatement",
"id": "20268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:05.040+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:01.909 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:02.567 [print] {
"resourceType": "MedicationStatement",
"id": "20268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:05.040+02:00",
"source": "#yPpVvyeJIvfV6TML",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:03.206 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:03.822 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:06.346+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:06.346+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:03.823 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:04.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:04.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oAvRvlHlMfuOnPp9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20269/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20269/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:04.472 [print] {
"resourceType": "MedicationStatement",
"id": "20269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:07.596+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:04.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:04.474 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:04.474 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oAvRvlHlMfuOnPp9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20269/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20269/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:04.474 [print] {
"resourceType": "MedicationStatement",
"id": "20269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:07.596+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:04.474 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:05.094 [print] {
"resourceType": "MedicationStatement",
"id": "20269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:07.596+02:00",
"source": "#oAvRvlHlMfuOnPp9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:05.725 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:06.337 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:08.864+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:08.864+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:06.339 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:07.000 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:07.000 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qQud69eXAzHPZCUW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20270/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20270/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:07.000 [print] {
"resourceType": "MedicationStatement",
"id": "20270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:10.129+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:07.000 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:07.002 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:07.002 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qQud69eXAzHPZCUW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20270/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20270/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:07.002 [print] {
"resourceType": "MedicationStatement",
"id": "20270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:10.129+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:07.002 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:07.620 [print] {
"resourceType": "MedicationStatement",
"id": "20270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:10.129+02:00",
"source": "#qQud69eXAzHPZCUW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:08.262 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:09.013 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:11.400+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:11.400+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:09.014 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:09.656 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:09.656 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IacGKm4cgIfI8qmY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20271/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20271/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:09.657 [print] {
"resourceType": "MedicationStatement",
"id": "20271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:12.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:09.657 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:09.658 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:09.658 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IacGKm4cgIfI8qmY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20271/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20271/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:09.658 [print] {
"resourceType": "MedicationStatement",
"id": "20271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:12.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:09.658 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:10.285 [print] {
"resourceType": "MedicationStatement",
"id": "20271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:12.761+02:00",
"source": "#IacGKm4cgIfI8qmY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:11.915 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:12.514 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:15.045+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:15.045+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:12.516 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:13.121 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:13.121 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4Ta8VBpQODRaHNvm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20272/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20272/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:13.121 [print] {
"resourceType": "MedicationStatement",
"id": "20272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:16.253+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:13.121 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:13.122 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:13.122 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4Ta8VBpQODRaHNvm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20272/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20272/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:13.122 [print] {
"resourceType": "MedicationStatement",
"id": "20272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:16.253+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:13.123 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:13.728 [print] {
"resourceType": "MedicationStatement",
"id": "20272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:16.253+02:00",
"source": "#4Ta8VBpQODRaHNvm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:15.368 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:15.994 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:18.506+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:18.506+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:15.995 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:16.578 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:16.578 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gNXdlA2v5HMRhTWK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20273/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20273/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:16.578 [print] {
"resourceType": "MedicationStatement",
"id": "20273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:19.715+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:16.578 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:16.580 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:16.580 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gNXdlA2v5HMRhTWK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20273/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20273/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:16.580 [print] {
"resourceType": "MedicationStatement",
"id": "20273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:19.715+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:16.580 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:17.204 [print] {
"resourceType": "MedicationStatement",
"id": "20273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:19.715+02:00",
"source": "#gNXdlA2v5HMRhTWK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:17.812 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:18.400 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:20.949+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:20.949+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:18.402 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:19.010 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:19.010 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kz6v9Ioca1szcLtB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20274/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20274/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:19.010 [print] {
"resourceType": "MedicationStatement",
"id": "20274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:22.150+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:19.010 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:19.012 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:19.012 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kz6v9Ioca1szcLtB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20274/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20274/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:19.012 [print] {
"resourceType": "MedicationStatement",
"id": "20274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:22.150+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:19.012 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:19.911 [print] {
"resourceType": "MedicationStatement",
"id": "20274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:22.150+02:00",
"source": "#Kz6v9Ioca1szcLtB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:20.526 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:21.152 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:23.664+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:23.664+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:21.154 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:21.894 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:21.894 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xOsAuP1UFJBqSEd8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20275/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20275/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:21.894 [print] {
"resourceType": "MedicationStatement",
"id": "20275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:25.017+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:21.894 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:21.896 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:21.896 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xOsAuP1UFJBqSEd8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20275/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20275/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:21.896 [print] {
"resourceType": "MedicationStatement",
"id": "20275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:25.017+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:21.896 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:23.492 [print] {
"resourceType": "MedicationStatement",
"id": "20275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:25.017+02:00",
"source": "#xOsAuP1UFJBqSEd8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:24.202 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:24.849 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:27.311+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:27.311+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:24.849 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:25.521 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:25.522 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0HStJytxa1jOxp4z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20276/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20276/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:25.522 [print] {
"resourceType": "MedicationStatement",
"id": "20276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:28.653+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:25.522 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:25.523 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:25.523 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0HStJytxa1jOxp4z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20276/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20276/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:25.523 [print] {
"resourceType": "MedicationStatement",
"id": "20276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:28.653+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:25.523 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:26.133 [print] {
"resourceType": "MedicationStatement",
"id": "20276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:28.653+02:00",
"source": "#0HStJytxa1jOxp4z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:26.763 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:27.392 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:29.902+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:29.902+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:27.393 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:28.049 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:28.049 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B71FomnTFUxbxmHR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20277/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20277/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:28.049 [print] {
"resourceType": "MedicationStatement",
"id": "20277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:31.180+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:28.049 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:28.050 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:28.050 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B71FomnTFUxbxmHR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20277/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20277/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:28.050 [print] {
"resourceType": "MedicationStatement",
"id": "20277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:31.180+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:28.050 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:28.666 [print] {
"resourceType": "MedicationStatement",
"id": "20277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:31.180+02:00",
"source": "#B71FomnTFUxbxmHR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:29.333 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:29.939 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:32.469+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:32.469+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:29.940 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:30.560 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:30.560 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"S2eFAdK9tXYndqlZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20278/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20278/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:30.560 [print] {
"resourceType": "MedicationStatement",
"id": "20278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:33.694+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:30.560 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:30.561 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:30.561 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"S2eFAdK9tXYndqlZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20278/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20278/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:30.561 [print] {
"resourceType": "MedicationStatement",
"id": "20278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:33.694+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:30.561 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:31.156 [print] {
"resourceType": "MedicationStatement",
"id": "20278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:33.694+02:00",
"source": "#S2eFAdK9tXYndqlZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:31.794 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:32.409 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:34.932+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:34.932+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:32.411 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:33.065 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:33.065 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Xu6gbBCfEKC8kDOJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20279/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20279/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:33.065 [print] {
"resourceType": "MedicationStatement",
"id": "20279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:36.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:33.065 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:33.066 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:33.066 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Xu6gbBCfEKC8kDOJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20279/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20279/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:33.066 [print] {
"resourceType": "MedicationStatement",
"id": "20279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:36.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:33.066 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:33.889 [print] {
"resourceType": "MedicationStatement",
"id": "20279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:36.187+02:00",
"source": "#Xu6gbBCfEKC8kDOJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:34.524 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:35.446 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:37.655+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:37.655+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:35.448 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:36.079 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:36.079 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j3Y9Kwl9YKCGgxrf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20280/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20280/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:36.079 [print] {
"resourceType": "MedicationStatement",
"id": "20280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:39.201+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:36.079 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:36.080 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:36.080 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j3Y9Kwl9YKCGgxrf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20280/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20280/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:36.080 [print] {
"resourceType": "MedicationStatement",
"id": "20280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:39.201+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:36.080 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:36.684 [print] {
"resourceType": "MedicationStatement",
"id": "20280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:39.201+02:00",
"source": "#j3Y9Kwl9YKCGgxrf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:37.322 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:38.131 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:40.456+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:40.456+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:38.132 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:38.777 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:38.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FbsfZJgfQFMbRnch"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20281/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20281/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:38.777 [print] {
"resourceType": "MedicationStatement",
"id": "20281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:41.915+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:38.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:38.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:38.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FbsfZJgfQFMbRnch"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20281/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20281/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:38.779 [print] {
"resourceType": "MedicationStatement",
"id": "20281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:41.915+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:38.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:39.417 [print] {
"resourceType": "MedicationStatement",
"id": "20281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:41.915+02:00",
"source": "#FbsfZJgfQFMbRnch",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:40.050 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:40.678 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:43.183+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:43.183+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:40.679 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:41.289 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:41.289 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fgyiQzHhz8U9Exue"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20282/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20282/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:41.289 [print] {
"resourceType": "MedicationStatement",
"id": "20282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:44.428+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:41.289 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:41.291 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:41.291 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fgyiQzHhz8U9Exue"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20282/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20282/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:41.291 [print] {
"resourceType": "MedicationStatement",
"id": "20282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:44.428+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:41.291 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:41.884 [print] {
"resourceType": "MedicationStatement",
"id": "20282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:44.428+02:00",
"source": "#fgyiQzHhz8U9Exue",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:42.495 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:43.121 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:45.637+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:45.637+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:43.122 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:43.759 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:43.759 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ymJ09GwJBE2js23p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20283/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20283/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:43.759 [print] {
"resourceType": "MedicationStatement",
"id": "20283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:46.894+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:43.759 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:43.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:43.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ymJ09GwJBE2js23p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20283/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20283/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:43.760 [print] {
"resourceType": "MedicationStatement",
"id": "20283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:46.894+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:43.761 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:44.362 [print] {
"resourceType": "MedicationStatement",
"id": "20283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:46.894+02:00",
"source": "#ymJ09GwJBE2js23p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:45.279 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:45.879 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:48.422+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:48.422+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:45.880 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:46.505 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:46.505 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SO4mbhhhENgPIToC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20284/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20284/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:46.505 [print] {
"resourceType": "MedicationStatement",
"id": "20284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:49.637+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:46.505 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:46.508 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:46.508 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SO4mbhhhENgPIToC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20284/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20284/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:46.508 [print] {
"resourceType": "MedicationStatement",
"id": "20284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:49.637+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:46.508 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:47.100 [print] {
"resourceType": "MedicationStatement",
"id": "20284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:49.637+02:00",
"source": "#SO4mbhhhENgPIToC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:47.707 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:48.556 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:50.848+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:50.848+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:48.557 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:49.217 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:49.217 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IyLG4mytGl3SJrDF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20285/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20285/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:49.217 [print] {
"resourceType": "MedicationStatement",
"id": "20285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:52.336+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:49.217 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:49.219 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:49.219 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IyLG4mytGl3SJrDF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20285/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20285/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:49.219 [print] {
"resourceType": "MedicationStatement",
"id": "20285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:52.336+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:49.219 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:49.844 [print] {
"resourceType": "MedicationStatement",
"id": "20285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:52.336+02:00",
"source": "#IyLG4mytGl3SJrDF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:50.556 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:51.161 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:53.690+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:53.690+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:51.162 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:51.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:51.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I6OjhTEzwhsngy5D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20286/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20286/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:51.784 [print] {
"resourceType": "MedicationStatement",
"id": "20286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:54.919+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:51.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:51.785 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:51.785 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I6OjhTEzwhsngy5D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20286/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20286/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:51.786 [print] {
"resourceType": "MedicationStatement",
"id": "20286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:54.919+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:51.786 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:52.409 [print] {
"resourceType": "MedicationStatement",
"id": "20286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:54.919+02:00",
"source": "#I6OjhTEzwhsngy5D",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:53.039 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:53.638 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:56.178+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:56.178+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:53.639 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:54.252 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:54.252 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VkvfTVljPiVZ5aa3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20287/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20287/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:54.252 [print] {
"resourceType": "MedicationStatement",
"id": "20287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:57.395+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:54.252 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:54.254 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:54.254 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VkvfTVljPiVZ5aa3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20287/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:00:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20287/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:54.254 [print] {
"resourceType": "MedicationStatement",
"id": "20287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:57.395+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:54.254 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:54.858 [print] {
"resourceType": "MedicationStatement",
"id": "20287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:00:57.395+02:00",
"source": "#VkvfTVljPiVZ5aa3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:55.490 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:56.326 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:00:58.627+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:00:58.627+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:56.327 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:56.962 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:56.962 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aVK2qslnI5st7RIq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20288/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20288/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:56.962 [print] {
"resourceType": "MedicationStatement",
"id": "20288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:00.093+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:56.962 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:56.964 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:56.964 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aVK2qslnI5st7RIq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20288/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20288/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:00:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:56.964 [print] {
"resourceType": "MedicationStatement",
"id": "20288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:00.093+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:56.964 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:00:57.560 [print] {
"resourceType": "MedicationStatement",
"id": "20288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:00.093+02:00",
"source": "#aVK2qslnI5st7RIq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:00:58.224 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:00:58.852 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:01.352+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:01.352+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:00:58.854 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:59.477 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:59.477 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K2ZCrWE5I0q1RYQo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20289/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20289/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:59.477 [print] {
"resourceType": "MedicationStatement",
"id": "20289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:02.610+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:59.477 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:00:59.479 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:00:59.479 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K2ZCrWE5I0q1RYQo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20289/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20289/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:00:59.479 [print] {
"resourceType": "MedicationStatement",
"id": "20289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:02.610+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:00:59.479 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:00.101 [print] {
"resourceType": "MedicationStatement",
"id": "20289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:02.610+02:00",
"source": "#K2ZCrWE5I0q1RYQo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:00.773 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:01.375 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:03.915+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:03.915+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:01.377 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:03.104 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:03.104 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5NFtehM9TtyGxDif"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20290/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20290/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:03.104 [print] {
"resourceType": "MedicationStatement",
"id": "20290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:06.232+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:03.104 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:03.105 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:03.106 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5NFtehM9TtyGxDif"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20290/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20290/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:03.106 [print] {
"resourceType": "MedicationStatement",
"id": "20290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:06.232+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:03.106 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:03.922 [print] {
"resourceType": "MedicationStatement",
"id": "20290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:06.232+02:00",
"source": "#5NFtehM9TtyGxDif",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:04.545 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:05.180 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:07.684+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:07.684+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:05.182 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:05.797 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:05.797 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nT1NYKYO5OuS5PVA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20291/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20291/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:05.797 [print] {
"resourceType": "MedicationStatement",
"id": "20291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:08.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:05.797 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:05.798 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:05.798 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nT1NYKYO5OuS5PVA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20291/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20291/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:05.798 [print] {
"resourceType": "MedicationStatement",
"id": "20291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:08.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:05.798 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:06.471 [print] {
"resourceType": "MedicationStatement",
"id": "20291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:08.930+02:00",
"source": "#nT1NYKYO5OuS5PVA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:07.107 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:07.773 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:10.246+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:10.246+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:07.775 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:08.427 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:08.427 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"G02ti2FBWN7N3ZDE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20292/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20292/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:08.427 [print] {
"resourceType": "MedicationStatement",
"id": "20292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:11.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:08.427 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:08.428 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:08.428 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"G02ti2FBWN7N3ZDE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20292/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20292/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:08.429 [print] {
"resourceType": "MedicationStatement",
"id": "20292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:11.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:08.429 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:09.028 [print] {
"resourceType": "MedicationStatement",
"id": "20292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:11.565+02:00",
"source": "#G02ti2FBWN7N3ZDE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:09.672 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:10.286 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:12.809+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:12.809+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:10.288 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:10.925 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:10.925 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pJflKBJKpVSaqUMR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20293/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20293/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:10.925 [print] {
"resourceType": "MedicationStatement",
"id": "20293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:14.072+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:10.925 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:10.927 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:10.927 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pJflKBJKpVSaqUMR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20293/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20293/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:10.927 [print] {
"resourceType": "MedicationStatement",
"id": "20293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:14.072+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:10.927 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:11.539 [print] {
"resourceType": "MedicationStatement",
"id": "20293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:14.072+02:00",
"source": "#pJflKBJKpVSaqUMR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:12.159 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:12.775 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:15.302+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:15.302+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:12.776 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:13.404 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:13.404 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1eQwrMlexW7bAF0z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20294/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20294/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:13.404 [print] {
"resourceType": "MedicationStatement",
"id": "20294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:16.546+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:13.404 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:13.405 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:13.405 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1eQwrMlexW7bAF0z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20294/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20294/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:13.405 [print] {
"resourceType": "MedicationStatement",
"id": "20294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:16.546+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:13.405 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:14.067 [print] {
"resourceType": "MedicationStatement",
"id": "20294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:16.546+02:00",
"source": "#1eQwrMlexW7bAF0z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:14.715 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:15.334 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:17.856+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:17.856+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:15.335 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:15.977 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:15.977 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"U1wpm4RO7kVcPmXY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20295/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20295/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:15.977 [print] {
"resourceType": "MedicationStatement",
"id": "20295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:19.111+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:15.977 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:15.978 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:15.978 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"U1wpm4RO7kVcPmXY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20295/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20295/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:15.978 [print] {
"resourceType": "MedicationStatement",
"id": "20295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:19.111+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:15.978 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:16.568 [print] {
"resourceType": "MedicationStatement",
"id": "20295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:19.111+02:00",
"source": "#U1wpm4RO7kVcPmXY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:17.176 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:17.782 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:20.320+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:20.320+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:17.784 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:18.721 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:18.721 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w2yBuwU665jp8ywu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20296/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20296/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:18.721 [print] {
"resourceType": "MedicationStatement",
"id": "20296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:21.856+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:18.721 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:18.722 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:18.722 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w2yBuwU665jp8ywu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20296/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20296/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:18.722 [print] {
"resourceType": "MedicationStatement",
"id": "20296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:21.856+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:18.722 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:19.328 [print] {
"resourceType": "MedicationStatement",
"id": "20296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:21.856+02:00",
"source": "#w2yBuwU665jp8ywu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:19.947 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:20.566 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:23.087+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:23.087+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:20.568 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:21.169 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:21.169 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k1SJulpV9cdfvFKz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20297/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20297/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:21.169 [print] {
"resourceType": "MedicationStatement",
"id": "20297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:24.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:21.169 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:21.170 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:21.170 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k1SJulpV9cdfvFKz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20297/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20297/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:21.170 [print] {
"resourceType": "MedicationStatement",
"id": "20297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:24.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:21.170 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:21.793 [print] {
"resourceType": "MedicationStatement",
"id": "20297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:24.310+02:00",
"source": "#k1SJulpV9cdfvFKz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:22.420 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:23.043 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:25.546+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:25.546+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:23.044 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:23.686 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:23.686 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0eqPN8gU5sWDdiPt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20298/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20298/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:23.686 [print] {
"resourceType": "MedicationStatement",
"id": "20298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:26.814+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:23.686 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:23.687 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:23.687 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0eqPN8gU5sWDdiPt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20298/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20298/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:23.687 [print] {
"resourceType": "MedicationStatement",
"id": "20298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:26.814+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:23.687 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:24.282 [print] {
"resourceType": "MedicationStatement",
"id": "20298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:26.814+02:00",
"source": "#0eqPN8gU5sWDdiPt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:24.918 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:25.571 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:28.049+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:28.049+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:25.572 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:27.208 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:27.208 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2rFnbRZCRtxhxYsb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20299/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20299/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:27.208 [print] {
"resourceType": "MedicationStatement",
"id": "20299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:30.345+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:27.208 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:27.209 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:27.209 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2rFnbRZCRtxhxYsb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20299/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20299/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:27.209 [print] {
"resourceType": "MedicationStatement",
"id": "20299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:30.345+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:27.209 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:27.813 [print] {
"resourceType": "MedicationStatement",
"id": "20299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:30.345+02:00",
"source": "#2rFnbRZCRtxhxYsb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:28.463 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:29.281 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:31.602+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:31.602+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:29.281 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:29.900 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:29.900 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wqUd3jFFFs2LxpvK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20300/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20300/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:29.900 [print] {
"resourceType": "MedicationStatement",
"id": "20300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:33.035+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:29.900 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:29.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:29.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wqUd3jFFFs2LxpvK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20300/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20300/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:29.902 [print] {
"resourceType": "MedicationStatement",
"id": "20300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:33.035+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:29.902 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:30.529 [print] {
"resourceType": "MedicationStatement",
"id": "20300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:33.035+02:00",
"source": "#wqUd3jFFFs2LxpvK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:31.157 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:31.793 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:34.295+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:34.295+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:31.795 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:32.414 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:32.414 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qPugXA16zbh4juxC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20301/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20301/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:32.414 [print] {
"resourceType": "MedicationStatement",
"id": "20301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:35.549+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:32.414 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:32.416 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:32.416 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qPugXA16zbh4juxC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20301/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20301/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:32.416 [print] {
"resourceType": "MedicationStatement",
"id": "20301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:35.549+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:32.416 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:33.013 [print] {
"resourceType": "MedicationStatement",
"id": "20301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:35.549+02:00",
"source": "#qPugXA16zbh4juxC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:33.635 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:34.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:36.774+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:36.774+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:34.264 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:34.903 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:34.903 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4tRVYXNCmFvaBOfU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20302/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20302/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:34.903 [print] {
"resourceType": "MedicationStatement",
"id": "20302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:38.043+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:34.903 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:34.904 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:34.904 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4tRVYXNCmFvaBOfU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20302/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20302/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:34.904 [print] {
"resourceType": "MedicationStatement",
"id": "20302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:38.043+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:34.904 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:35.536 [print] {
"resourceType": "MedicationStatement",
"id": "20302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:38.043+02:00",
"source": "#4tRVYXNCmFvaBOfU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:36.158 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:36.752 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:39.299+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:39.299+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:36.752 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:37.380 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:37.380 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5s6boJmAgQO2TbCF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20303/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20303/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:37.380 [print] {
"resourceType": "MedicationStatement",
"id": "20303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:40.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:37.380 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:37.381 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:37.381 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5s6boJmAgQO2TbCF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20303/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20303/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:37.381 [print] {
"resourceType": "MedicationStatement",
"id": "20303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:40.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:37.381 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:37.980 [print] {
"resourceType": "MedicationStatement",
"id": "20303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:40.519+02:00",
"source": "#5s6boJmAgQO2TbCF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:38.606 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:39.226 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:41.742+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:41.742+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:39.227 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:39.880 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:39.880 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"smmq9XKYOhyWVDsm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20304/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20304/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:39.880 [print] {
"resourceType": "MedicationStatement",
"id": "20304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:43.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:39.881 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:39.882 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:39.882 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"smmq9XKYOhyWVDsm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20304/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20304/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:39.882 [print] {
"resourceType": "MedicationStatement",
"id": "20304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:43.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:39.882 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:40.498 [print] {
"resourceType": "MedicationStatement",
"id": "20304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:43.010+02:00",
"source": "#smmq9XKYOhyWVDsm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:41.111 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:41.718 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:44.256+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:44.256+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:41.720 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:42.538 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:42.538 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"54H6XDMLh4EPnDw8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20305/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20305/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:42.538 [print] {
"resourceType": "MedicationStatement",
"id": "20305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:45.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:42.538 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:42.540 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:42.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"54H6XDMLh4EPnDw8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20305/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20305/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:42.540 [print] {
"resourceType": "MedicationStatement",
"id": "20305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:45.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:42.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:43.179 [print] {
"resourceType": "MedicationStatement",
"id": "20305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:45.680+02:00",
"source": "#54H6XDMLh4EPnDw8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:43.806 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:44.434 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:46.938+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:46.938+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:44.435 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:45.044 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:45.044 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gTqyXkDldFheuacO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20306/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20306/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:45.044 [print] {
"resourceType": "MedicationStatement",
"id": "20306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:48.189+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:45.044 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:45.046 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:45.046 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gTqyXkDldFheuacO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20306/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20306/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:45.046 [print] {
"resourceType": "MedicationStatement",
"id": "20306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:48.189+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:45.046 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:45.639 [print] {
"resourceType": "MedicationStatement",
"id": "20306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:48.189+02:00",
"source": "#gTqyXkDldFheuacO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:46.281 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:46.886 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:49.418+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:49.418+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:46.888 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:47.508 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:47.508 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SP4kapa9a88NjBmv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20307/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20307/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:47.508 [print] {
"resourceType": "MedicationStatement",
"id": "20307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:50.648+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:47.508 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:47.510 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:47.510 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SP4kapa9a88NjBmv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20307/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20307/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:47.510 [print] {
"resourceType": "MedicationStatement",
"id": "20307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:50.648+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:47.510 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:48.116 [print] {
"resourceType": "MedicationStatement",
"id": "20307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:50.648+02:00",
"source": "#SP4kapa9a88NjBmv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:48.744 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:49.350 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:51.887+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:51.887+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:49.351 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:49.976 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:49.976 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mbR5YTXg5kBwRmJn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20308/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20308/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:49.976 [print] {
"resourceType": "MedicationStatement",
"id": "20308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:53.110+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:49.976 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:49.978 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:49.978 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mbR5YTXg5kBwRmJn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20308/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20308/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:49.978 [print] {
"resourceType": "MedicationStatement",
"id": "20308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:53.110+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:49.978 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:50.591 [print] {
"resourceType": "MedicationStatement",
"id": "20308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:53.110+02:00",
"source": "#mbR5YTXg5kBwRmJn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:51.231 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:52.855 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:54.371+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:54.371+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:52.857 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:53.478 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:53.478 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AjQywh0Ie8EFg0gf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20309/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20309/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:53.478 [print] {
"resourceType": "MedicationStatement",
"id": "20309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:56.618+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:53.478 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:53.480 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:53.480 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AjQywh0Ie8EFg0gf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20309/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20309/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:53.480 [print] {
"resourceType": "MedicationStatement",
"id": "20309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:56.618+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:53.480 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:54.102 [print] {
"resourceType": "MedicationStatement",
"id": "20309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:56.618+02:00",
"source": "#AjQywh0Ie8EFg0gf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:54.702 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:55.304 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:01:57.849+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:01:57.849+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:55.306 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:55.907 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:55.907 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nrhpcndjAvN8Mr9B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20310/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20310/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:55.907 [print] {
"resourceType": "MedicationStatement",
"id": "20310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:59.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:55.907 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:55.909 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:55.909 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nrhpcndjAvN8Mr9B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20310/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:01:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20310/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:01:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:55.909 [print] {
"resourceType": "MedicationStatement",
"id": "20310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:59.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:55.909 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:01:56.535 [print] {
"resourceType": "MedicationStatement",
"id": "20310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:01:59.047+02:00",
"source": "#nrhpcndjAvN8Mr9B",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:01:57.143 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:01:57.774 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:00.290+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:00.290+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:01:57.774 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:59.613 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:59.613 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zoH2WShvcwzwiumJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20311/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20311/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:59.613 [print] {
"resourceType": "MedicationStatement",
"id": "20311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:02.747+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:59.613 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:01:59.614 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:01:59.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zoH2WShvcwzwiumJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20311/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20311/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:01:59.614 [print] {
"resourceType": "MedicationStatement",
"id": "20311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:02.747+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:01:59.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:00.245 [print] {
"resourceType": "MedicationStatement",
"id": "20311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:02.747+02:00",
"source": "#zoH2WShvcwzwiumJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:00.851 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:01.479 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:03.999+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:03.999+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:01.479 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:02.134 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:02.134 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gA2aRj8Ki2P217q1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20312/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20312/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:02.134 [print] {
"resourceType": "MedicationStatement",
"id": "20312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:05.218+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:02.134 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:02.135 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:02.135 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gA2aRj8Ki2P217q1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20312/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20312/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:02.135 [print] {
"resourceType": "MedicationStatement",
"id": "20312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:05.218+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:02.135 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:02.768 [print] {
"resourceType": "MedicationStatement",
"id": "20312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:05.218+02:00",
"source": "#gA2aRj8Ki2P217q1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:03.420 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:04.043 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:06.553+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:06.553+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:04.044 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:04.936 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:04.936 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oHhR9d8tgj6SZsUR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20313/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20313/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:04.936 [print] {
"resourceType": "MedicationStatement",
"id": "20313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:08.072+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:04.936 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:04.938 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:04.938 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oHhR9d8tgj6SZsUR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20313/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20313/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:04.938 [print] {
"resourceType": "MedicationStatement",
"id": "20313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:08.072+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:04.938 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:05.525 [print] {
"resourceType": "MedicationStatement",
"id": "20313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:08.072+02:00",
"source": "#oHhR9d8tgj6SZsUR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:06.118 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:06.710 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:09.263+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:09.263+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:06.711 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:07.333 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:07.333 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xyw1PeYf52PICsjR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20314/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20314/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:07.333 [print] {
"resourceType": "MedicationStatement",
"id": "20314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:10.474+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:07.333 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:07.335 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:07.335 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xyw1PeYf52PICsjR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20314/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20314/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:07.335 [print] {
"resourceType": "MedicationStatement",
"id": "20314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:10.474+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:07.335 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:07.946 [print] {
"resourceType": "MedicationStatement",
"id": "20314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:10.474+02:00",
"source": "#xyw1PeYf52PICsjR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:08.757 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:09.414 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:11.899+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:11.899+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:09.415 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:10.125 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:10.125 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BHKqHERnnHBjwWUn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20315/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20315/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:10.125 [print] {
"resourceType": "MedicationStatement",
"id": "20315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:13.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:10.125 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:10.127 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:10.127 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BHKqHERnnHBjwWUn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20315/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20315/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:10.127 [print] {
"resourceType": "MedicationStatement",
"id": "20315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:13.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:10.127 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:11.011 [print] {
"resourceType": "MedicationStatement",
"id": "20315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:13.272+02:00",
"source": "#BHKqHERnnHBjwWUn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:11.655 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:12.272 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:14.772+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:14.772+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:12.273 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:12.909 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:12.909 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dc6am2nDadAM7tsz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20316/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20316/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:12.909 [print] {
"resourceType": "MedicationStatement",
"id": "20316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:16.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:12.909 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:12.910 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:12.910 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Dc6am2nDadAM7tsz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20316/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20316/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:12.910 [print] {
"resourceType": "MedicationStatement",
"id": "20316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:16.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:12.911 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:14.747 [print] {
"resourceType": "MedicationStatement",
"id": "20316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:16.049+02:00",
"source": "#Dc6am2nDadAM7tsz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:15.379 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
http call failed after 443 milliseconds for url: https://psp-sp-fhir.prep.sanit.cineca.it/fhir/MedicationStatement/20316 karate/src/features/api/xaj.feature:46
Then
status 410
And
print response
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:15.826 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:16.442 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:16.442 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PAgZphvPp1wXRuNz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20317/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20317/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:16.442 [print] {
"resourceType": "MedicationStatement",
"id": "20317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:19.579+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:16.442 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:16.443 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:16.443 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PAgZphvPp1wXRuNz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20317/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20317/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:16.443 [print] {
"resourceType": "MedicationStatement",
"id": "20317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:19.579+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:16.443 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:17.047 [print] {
"resourceType": "MedicationStatement",
"id": "20317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:19.579+02:00",
"source": "#PAgZphvPp1wXRuNz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:17.686 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:18.312 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:20.827+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:20.827+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:18.313 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:18.946 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:18.947 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ADY9HkYHDT7MIGGR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20318/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20318/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:18.947 [print] {
"resourceType": "MedicationStatement",
"id": "20318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:22.085+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:18.947 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:18.948 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:18.948 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ADY9HkYHDT7MIGGR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20318/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20318/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:18.948 [print] {
"resourceType": "MedicationStatement",
"id": "20318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:22.085+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:18.948 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:19.572 [print] {
"resourceType": "MedicationStatement",
"id": "20318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:22.085+02:00",
"source": "#ADY9HkYHDT7MIGGR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:20.182 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:20.795 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:23.322+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:23.322+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:20.797 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:21.410 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:21.410 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"flS8IDHZl44KyLSN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20319/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20319/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:21.410 [print] {
"resourceType": "MedicationStatement",
"id": "20319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:24.558+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:21.410 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:21.412 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:21.412 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"flS8IDHZl44KyLSN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20319/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20319/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:21.412 [print] {
"resourceType": "MedicationStatement",
"id": "20319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:24.558+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:21.412 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:22.011 [print] {
"resourceType": "MedicationStatement",
"id": "20319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:24.558+02:00",
"source": "#flS8IDHZl44KyLSN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:22.644 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:23.239 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:25.772+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:25.772+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:23.240 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:23.861 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:23.861 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wQ9RIa09vL26ggho"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20320/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20320/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:23.861 [print] {
"resourceType": "MedicationStatement",
"id": "20320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:26.999+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:23.861 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:23.862 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:23.862 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wQ9RIa09vL26ggho"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20320/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20320/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:23.863 [print] {
"resourceType": "MedicationStatement",
"id": "20320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:26.999+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:23.863 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:24.463 [print] {
"resourceType": "MedicationStatement",
"id": "20320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:26.999+02:00",
"source": "#wQ9RIa09vL26ggho",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:25.075 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:25.684 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:28.219+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:28.219+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:25.686 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:26.303 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:26.303 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BF31czo4GRMar12V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20321/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20321/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:26.303 [print] {
"resourceType": "MedicationStatement",
"id": "20321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:29.438+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:26.303 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:26.306 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:26.306 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BF31czo4GRMar12V"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20321/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20321/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:26.306 [print] {
"resourceType": "MedicationStatement",
"id": "20321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:29.438+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:26.306 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:26.926 [print] {
"resourceType": "MedicationStatement",
"id": "20321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:29.438+02:00",
"source": "#BF31czo4GRMar12V",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:27.568 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:28.394 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:30.694+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:30.694+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:28.396 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:29.025 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:29.025 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sv1Dgx567u9bbkGw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20322/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20322/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:29.025 [print] {
"resourceType": "MedicationStatement",
"id": "20322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:32.165+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:29.025 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:29.026 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:29.026 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sv1Dgx567u9bbkGw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20322/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20322/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:29.026 [print] {
"resourceType": "MedicationStatement",
"id": "20322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:32.165+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:29.026 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:29.644 [print] {
"resourceType": "MedicationStatement",
"id": "20322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:32.165+02:00",
"source": "#sv1Dgx567u9bbkGw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:30.324 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:30.938 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:33.447+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:33.447+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:30.939 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:31.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:31.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6jUrJNLyhrVZiX66"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20323/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20323/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:31.568 [print] {
"resourceType": "MedicationStatement",
"id": "20323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:34.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:31.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:31.570 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:31.570 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6jUrJNLyhrVZiX66"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20323/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20323/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:31.570 [print] {
"resourceType": "MedicationStatement",
"id": "20323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:34.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:31.570 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:32.212 [print] {
"resourceType": "MedicationStatement",
"id": "20323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:34.700+02:00",
"source": "#6jUrJNLyhrVZiX66",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:33.856 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:34.466 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:36.999+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:36.999+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:34.468 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:35.084 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:35.084 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Uq15m9jL7XNDyDAR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20324/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20324/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:35.084 [print] {
"resourceType": "MedicationStatement",
"id": "20324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:38.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:35.084 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:35.085 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:35.085 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Uq15m9jL7XNDyDAR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20324/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20324/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:35.085 [print] {
"resourceType": "MedicationStatement",
"id": "20324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:38.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:35.086 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:35.716 [print] {
"resourceType": "MedicationStatement",
"id": "20324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:38.231+02:00",
"source": "#Uq15m9jL7XNDyDAR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:36.318 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:37.007 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:39.458+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:39.458+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:37.009 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:37.614 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:37.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qhrZWo5GHvLP5DoU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20325/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20325/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:37.614 [print] {
"resourceType": "MedicationStatement",
"id": "20325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:40.755+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:37.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:37.616 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:37.616 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qhrZWo5GHvLP5DoU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20325/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20325/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:37.616 [print] {
"resourceType": "MedicationStatement",
"id": "20325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:40.755+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:37.616 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:38.257 [print] {
"resourceType": "MedicationStatement",
"id": "20325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:40.755+02:00",
"source": "#qhrZWo5GHvLP5DoU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:38.873 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:39.482 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:42.017+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:42.017+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:39.484 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:40.112 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:40.112 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eX1jHYV3DqVgyvGc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20326/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20326/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:40.112 [print] {
"resourceType": "MedicationStatement",
"id": "20326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:43.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:40.112 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:40.114 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:40.114 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eX1jHYV3DqVgyvGc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20326/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20326/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:40.114 [print] {
"resourceType": "MedicationStatement",
"id": "20326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:43.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:40.114 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:40.706 [print] {
"resourceType": "MedicationStatement",
"id": "20326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:43.222+02:00",
"source": "#eX1jHYV3DqVgyvGc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:41.330 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:41.941 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:44.473+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:44.473+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:41.943 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:42.573 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:42.573 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WzzZgTKaRsx3gDla"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20327/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20327/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:42.573 [print] {
"resourceType": "MedicationStatement",
"id": "20327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:45.715+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:42.573 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:42.575 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:42.575 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WzzZgTKaRsx3gDla"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20327/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20327/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:42.576 [print] {
"resourceType": "MedicationStatement",
"id": "20327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:45.715+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:42.576 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:43.191 [print] {
"resourceType": "MedicationStatement",
"id": "20327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:45.715+02:00",
"source": "#WzzZgTKaRsx3gDla",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:43.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:44.429 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:46.950+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:46.950+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:44.431 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:45.067 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:45.067 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ndHVkM3NLu4j24Ny"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20328/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20328/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:45.067 [print] {
"resourceType": "MedicationStatement",
"id": "20328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:48.199+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:45.067 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:45.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:45.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ndHVkM3NLu4j24Ny"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20328/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20328/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:45.069 [print] {
"resourceType": "MedicationStatement",
"id": "20328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:48.199+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:45.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:45.705 [print] {
"resourceType": "MedicationStatement",
"id": "20328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:48.199+02:00",
"source": "#ndHVkM3NLu4j24Ny",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:46.319 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:46.914 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:49.458+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:49.458+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:46.915 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:47.528 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:47.528 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X1qpkSMuMVxkcZOm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20329/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20329/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:47.528 [print] {
"resourceType": "MedicationStatement",
"id": "20329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:50.668+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:47.528 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:47.530 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:47.530 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X1qpkSMuMVxkcZOm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20329/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20329/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:47.530 [print] {
"resourceType": "MedicationStatement",
"id": "20329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:50.668+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:47.530 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:48.145 [print] {
"resourceType": "MedicationStatement",
"id": "20329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:50.668+02:00",
"source": "#X1qpkSMuMVxkcZOm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:48.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:49.414 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:51.927+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:51.927+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:49.415 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:50.056 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:50.056 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CdS3naBryLvcPXFg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20330/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20330/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:50.056 [print] {
"resourceType": "MedicationStatement",
"id": "20330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:53.179+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:50.056 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:50.058 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:50.058 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CdS3naBryLvcPXFg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20330/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20330/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:50.058 [print] {
"resourceType": "MedicationStatement",
"id": "20330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:53.179+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:50.058 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:50.696 [print] {
"resourceType": "MedicationStatement",
"id": "20330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:53.179+02:00",
"source": "#CdS3naBryLvcPXFg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:51.289 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:51.900 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:54.438+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:54.438+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:51.902 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:52.534 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:52.534 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ePkJR2dGK324bYgC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20331/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20331/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:52.534 [print] {
"resourceType": "MedicationStatement",
"id": "20331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:55.668+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:52.534 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:52.536 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:52.536 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ePkJR2dGK324bYgC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20331/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20331/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:52.536 [print] {
"resourceType": "MedicationStatement",
"id": "20331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:55.668+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:52.536 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:53.414 [print] {
"resourceType": "MedicationStatement",
"id": "20331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:55.668+02:00",
"source": "#ePkJR2dGK324bYgC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:54.073 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:55.663 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:02:57.209+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:02:57.209+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:55.664 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:56.272 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:56.272 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MLVDJyT9KR8pGdKR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20332/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20332/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:56.273 [print] {
"resourceType": "MedicationStatement",
"id": "20332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:59.416+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:56.273 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:56.274 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:56.274 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MLVDJyT9KR8pGdKR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20332/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:02:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20332/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:02:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:56.274 [print] {
"resourceType": "MedicationStatement",
"id": "20332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:59.416+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:56.274 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:56.865 [print] {
"resourceType": "MedicationStatement",
"id": "20332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:02:59.416+02:00",
"source": "#MLVDJyT9KR8pGdKR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:02:57.548 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:02:58.394 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:00.686+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:00.686+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:02:58.395 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:59.285 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:59.285 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1Udp9x9l9XlBEZ1p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20333/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20333/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:59.285 [print] {
"resourceType": "MedicationStatement",
"id": "20333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:02.434+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:59.285 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:02:59.286 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:02:59.286 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1Udp9x9l9XlBEZ1p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20333/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20333/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:02:59.286 [print] {
"resourceType": "MedicationStatement",
"id": "20333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:02.434+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:02:59.286 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:02:59.911 [print] {
"resourceType": "MedicationStatement",
"id": "20333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:02.434+02:00",
"source": "#1Udp9x9l9XlBEZ1p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:00.560 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:01.187 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:03.698+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:03.698+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:01.189 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:01.805 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:01.805 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m5XjuN79v7QdaQmk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20334/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20334/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:01.805 [print] {
"resourceType": "MedicationStatement",
"id": "20334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:04.945+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:01.805 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:01.807 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:01.807 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m5XjuN79v7QdaQmk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20334/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20334/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:01.807 [print] {
"resourceType": "MedicationStatement",
"id": "20334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:04.945+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:01.807 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:02.411 [print] {
"resourceType": "MedicationStatement",
"id": "20334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:04.945+02:00",
"source": "#m5XjuN79v7QdaQmk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:03.058 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:03.823 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:06.193+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:06.193+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:03.825 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:04.484 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:04.484 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DL8NvJsDezbNXfEP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20335/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20335/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:04.484 [print] {
"resourceType": "MedicationStatement",
"id": "20335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:07.609+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:04.484 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:04.486 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:04.486 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DL8NvJsDezbNXfEP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20335/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20335/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:04.486 [print] {
"resourceType": "MedicationStatement",
"id": "20335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:07.609+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:04.486 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:05.118 [print] {
"resourceType": "MedicationStatement",
"id": "20335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:07.609+02:00",
"source": "#DL8NvJsDezbNXfEP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:05.744 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:06.362 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:08.891+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:08.891+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:06.363 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:06.968 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:06.968 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FUmm6eftWTR4MZ8N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20336/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20336/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:06.968 [print] {
"resourceType": "MedicationStatement",
"id": "20336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:10.110+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:06.968 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:06.970 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:06.970 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FUmm6eftWTR4MZ8N"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20336/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20336/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:06.970 [print] {
"resourceType": "MedicationStatement",
"id": "20336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:10.110+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:06.970 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:07.581 [print] {
"resourceType": "MedicationStatement",
"id": "20336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:10.110+02:00",
"source": "#FUmm6eftWTR4MZ8N",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:08.210 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:08.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:11.345+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:11.345+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:08.813 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:09.441 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:09.441 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"H0eRcU3MxQ4rxuag"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20337/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20337/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:09.441 [print] {
"resourceType": "MedicationStatement",
"id": "20337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:12.557+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:09.441 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:09.443 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:09.443 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"H0eRcU3MxQ4rxuag"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20337/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20337/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:09.443 [print] {
"resourceType": "MedicationStatement",
"id": "20337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:12.557+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:09.443 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:10.085 [print] {
"resourceType": "MedicationStatement",
"id": "20337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:12.557+02:00",
"source": "#H0eRcU3MxQ4rxuag",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:10.709 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:11.338 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:13.859+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:13.859+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:11.339 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:11.945 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:11.945 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1FzO4EWP7LAt9Gw1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20338/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20338/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:11.945 [print] {
"resourceType": "MedicationStatement",
"id": "20338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:15.090+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:11.945 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:11.946 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:11.946 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1FzO4EWP7LAt9Gw1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20338/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20338/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:11.946 [print] {
"resourceType": "MedicationStatement",
"id": "20338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:15.090+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:11.946 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:12.759 [print] {
"resourceType": "MedicationStatement",
"id": "20338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:15.090+02:00",
"source": "#1FzO4EWP7LAt9Gw1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:13.378 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:13.984 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:16.521+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:16.521+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:13.986 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:14.612 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:14.612 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lT6fhWHv7ErHGB9Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20339/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20339/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:14.612 [print] {
"resourceType": "MedicationStatement",
"id": "20339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:17.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:14.612 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:14.614 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:14.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lT6fhWHv7ErHGB9Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20339/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20339/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:14.614 [print] {
"resourceType": "MedicationStatement",
"id": "20339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:17.758+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:14.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:15.238 [print] {
"resourceType": "MedicationStatement",
"id": "20339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:17.758+02:00",
"source": "#lT6fhWHv7ErHGB9Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:15.848 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:16.685 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:18.995+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:18.995+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:16.686 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:17.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:17.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B4gfmvfLdzJYhNiy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20340/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20340/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:17.307 [print] {
"resourceType": "MedicationStatement",
"id": "20340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:20.443+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:17.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:17.308 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:17.308 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B4gfmvfLdzJYhNiy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20340/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20340/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:17.308 [print] {
"resourceType": "MedicationStatement",
"id": "20340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:20.443+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:17.308 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:17.913 [print] {
"resourceType": "MedicationStatement",
"id": "20340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:20.443+02:00",
"source": "#B4gfmvfLdzJYhNiy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:18.510 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:19.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:21.658+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:21.658+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:19.134 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:19.746 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:19.746 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eRg7X7Bfntaxc9xM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20341/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20341/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:19.746 [print] {
"resourceType": "MedicationStatement",
"id": "20341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:22.885+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:19.746 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:19.747 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:19.747 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eRg7X7Bfntaxc9xM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20341/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20341/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:19.747 [print] {
"resourceType": "MedicationStatement",
"id": "20341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:22.885+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:19.747 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:20.358 [print] {
"resourceType": "MedicationStatement",
"id": "20341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:22.885+02:00",
"source": "#eRg7X7Bfntaxc9xM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:20.986 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:21.991 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:24.134+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:24.134+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:21.992 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:22.630 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:22.630 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3Yh7xPrJcpr0scOt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20342/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20342/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:22.630 [print] {
"resourceType": "MedicationStatement",
"id": "20342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:25.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:22.630 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:22.632 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:22.632 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3Yh7xPrJcpr0scOt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20342/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20342/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:22.632 [print] {
"resourceType": "MedicationStatement",
"id": "20342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:25.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:22.632 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:23.237 [print] {
"resourceType": "MedicationStatement",
"id": "20342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:25.765+02:00",
"source": "#3Yh7xPrJcpr0scOt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:23.847 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:24.465 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:26.994+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:26.994+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:24.467 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:25.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:25.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xoSXTYJbLLHsE4tC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20343/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20343/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:25.113 [print] {
"resourceType": "MedicationStatement",
"id": "20343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:28.257+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:25.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:25.115 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:25.115 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xoSXTYJbLLHsE4tC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20343/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20343/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:25.115 [print] {
"resourceType": "MedicationStatement",
"id": "20343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:28.257+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:25.115 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:25.712 [print] {
"resourceType": "MedicationStatement",
"id": "20343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:28.257+02:00",
"source": "#xoSXTYJbLLHsE4tC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:26.341 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:27.027 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:29.492+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:29.492+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:27.028 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:27.647 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:27.647 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RiUH6WaPEO0GfzHl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20344/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20344/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:27.647 [print] {
"resourceType": "MedicationStatement",
"id": "20344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:30.788+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:27.647 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:27.648 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:27.648 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RiUH6WaPEO0GfzHl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20344/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20344/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:27.648 [print] {
"resourceType": "MedicationStatement",
"id": "20344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:30.788+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:27.648 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:28.251 [print] {
"resourceType": "MedicationStatement",
"id": "20344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:30.788+02:00",
"source": "#RiUH6WaPEO0GfzHl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:28.879 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:29.731 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:32.025+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:32.025+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:29.733 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:30.375 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:30.375 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iywtlCl91MDN05sW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20345/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20345/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:30.375 [print] {
"resourceType": "MedicationStatement",
"id": "20345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:33.500+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:30.375 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:30.376 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:30.376 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iywtlCl91MDN05sW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20345/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20345/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:30.376 [print] {
"resourceType": "MedicationStatement",
"id": "20345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:33.500+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:30.376 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:30.980 [print] {
"resourceType": "MedicationStatement",
"id": "20345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:33.500+02:00",
"source": "#iywtlCl91MDN05sW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:31.588 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:32.195 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:34.739+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:34.739+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:32.197 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:32.839 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:32.839 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kuts6zg5n7LrB4lt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20346/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20346/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:32.839 [print] {
"resourceType": "MedicationStatement",
"id": "20346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:35.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:32.839 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:32.841 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:32.841 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kuts6zg5n7LrB4lt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20346/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20346/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:32.841 [print] {
"resourceType": "MedicationStatement",
"id": "20346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:35.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:32.841 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:33.462 [print] {
"resourceType": "MedicationStatement",
"id": "20346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:35.960+02:00",
"source": "#kuts6zg5n7LrB4lt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:35.125 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:35.746 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:38.270+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:38.270+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:35.748 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:36.605 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:36.605 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tBGVcVW2Qvx0BP7I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20347/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20347/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:36.605 [print] {
"resourceType": "MedicationStatement",
"id": "20347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:39.751+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:36.605 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:36.607 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:36.607 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tBGVcVW2Qvx0BP7I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20347/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20347/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:36.607 [print] {
"resourceType": "MedicationStatement",
"id": "20347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:39.751+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:36.607 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:37.414 [print] {
"resourceType": "MedicationStatement",
"id": "20347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:39.751+02:00",
"source": "#tBGVcVW2Qvx0BP7I",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:38.038 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:38.655 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:41.186+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:41.186+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:38.658 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:40.297 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:40.297 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LGUPQtE1W7zugn28"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20348/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20348/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:40.298 [print] {
"resourceType": "MedicationStatement",
"id": "20348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:43.437+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:40.298 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:40.299 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:40.299 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LGUPQtE1W7zugn28"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20348/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20348/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:40.299 [print] {
"resourceType": "MedicationStatement",
"id": "20348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:43.437+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:40.299 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:41.014 [print] {
"resourceType": "MedicationStatement",
"id": "20348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:43.437+02:00",
"source": "#LGUPQtE1W7zugn28",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:41.627 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:42.235 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:44.769+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:44.769+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:42.237 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:42.870 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:42.870 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k6WB2DS0uazHi0gf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20349/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20349/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:42.870 [print] {
"resourceType": "MedicationStatement",
"id": "20349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:46.003+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:42.870 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:42.871 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:42.871 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"k6WB2DS0uazHi0gf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20349/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20349/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:42.871 [print] {
"resourceType": "MedicationStatement",
"id": "20349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:46.003+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:42.871 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:43.501 [print] {
"resourceType": "MedicationStatement",
"id": "20349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:46.003+02:00",
"source": "#k6WB2DS0uazHi0gf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:44.143 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:44.757 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:47.292+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:47.292+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:44.759 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:45.383 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:45.383 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XqwRTYamzp1im3JD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20350/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20350/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:45.383 [print] {
"resourceType": "MedicationStatement",
"id": "20350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:48.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:45.383 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:45.385 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:45.385 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XqwRTYamzp1im3JD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20350/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20350/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:45.385 [print] {
"resourceType": "MedicationStatement",
"id": "20350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:48.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:45.385 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:45.998 [print] {
"resourceType": "MedicationStatement",
"id": "20350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:48.517+02:00",
"source": "#XqwRTYamzp1im3JD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:46.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:47.226 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:49.761+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:49.761+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:47.228 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:47.845 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:47.845 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g4ewKmhj7q5wqDaV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20351/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20351/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:47.845 [print] {
"resourceType": "MedicationStatement",
"id": "20351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:50.979+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:47.845 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:47.846 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:47.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g4ewKmhj7q5wqDaV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20351/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20351/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:47.847 [print] {
"resourceType": "MedicationStatement",
"id": "20351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:50.979+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:47.847 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:48.455 [print] {
"resourceType": "MedicationStatement",
"id": "20351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:50.979+02:00",
"source": "#g4ewKmhj7q5wqDaV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:50.066 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:51.082 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:53.214+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:53.214+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:51.084 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:51.709 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:51.709 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WYiSAD6NQkqdSNg5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20352/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20352/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:51.709 [print] {
"resourceType": "MedicationStatement",
"id": "20352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:54.849+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:51.709 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:51.711 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:51.711 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WYiSAD6NQkqdSNg5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20352/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20352/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:51.711 [print] {
"resourceType": "MedicationStatement",
"id": "20352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:54.849+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:51.711 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:52.313 [print] {
"resourceType": "MedicationStatement",
"id": "20352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:54.849+02:00",
"source": "#WYiSAD6NQkqdSNg5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:52.932 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:53.544 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:56.077+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:56.077+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:53.546 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:54.169 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:54.169 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Uoy4rb6OsLOBwqVu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20353/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20353/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:54.169 [print] {
"resourceType": "MedicationStatement",
"id": "20353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:57.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:54.169 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:54.172 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:54.172 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Uoy4rb6OsLOBwqVu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20353/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20353/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:54.172 [print] {
"resourceType": "MedicationStatement",
"id": "20353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:57.315+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:54.172 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:54.778 [print] {
"resourceType": "MedicationStatement",
"id": "20353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:57.315+02:00",
"source": "#Uoy4rb6OsLOBwqVu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:55.416 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:03:56.030 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:03:58.564+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:03:58.564+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:03:56.032 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:56.664 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:56.665 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JOGXNQA3Mzeg34PZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20354/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20354/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:56.665 [print] {
"resourceType": "MedicationStatement",
"id": "20354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:59.803+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:56.665 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:03:56.666 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:03:56.666 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JOGXNQA3Mzeg34PZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20354/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:03:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20354/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:03:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:03:56.666 [print] {
"resourceType": "MedicationStatement",
"id": "20354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:59.803+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:03:56.666 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:03:57.698 [print] {
"resourceType": "MedicationStatement",
"id": "20354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:03:59.803+02:00",
"source": "#JOGXNQA3Mzeg34PZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:03:59.359 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:00.970 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:02.499+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:02.499+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:00.972 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:01.581 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:01.581 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V3TSZ760tdWx8p2U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20355/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20355/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:01.581 [print] {
"resourceType": "MedicationStatement",
"id": "20355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:04.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:01.582 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:01.583 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:01.584 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V3TSZ760tdWx8p2U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20355/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20355/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:01.584 [print] {
"resourceType": "MedicationStatement",
"id": "20355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:04.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:01.584 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:02.196 [print] {
"resourceType": "MedicationStatement",
"id": "20355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:04.722+02:00",
"source": "#V3TSZ760tdWx8p2U",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:02.944 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:03.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:06.078+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:06.078+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:03.587 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:04.219 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:04.219 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g7mGZGucxu7h0v4J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20356/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20356/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:04.219 [print] {
"resourceType": "MedicationStatement",
"id": "20356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:07.361+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:04.219 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:04.220 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:04.220 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g7mGZGucxu7h0v4J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20356/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20356/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:04.220 [print] {
"resourceType": "MedicationStatement",
"id": "20356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:07.361+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:04.220 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:05.838 [print] {
"resourceType": "MedicationStatement",
"id": "20356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:07.361+02:00",
"source": "#g7mGZGucxu7h0v4J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:06.474 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:07.136 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:09.609+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:09.609+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:07.138 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:07.765 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:07.765 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UpmOYycpMfUCdJpy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20357/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20357/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:07.765 [print] {
"resourceType": "MedicationStatement",
"id": "20357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:10.901+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:07.765 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:07.767 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:07.767 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UpmOYycpMfUCdJpy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20357/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20357/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:07.767 [print] {
"resourceType": "MedicationStatement",
"id": "20357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:10.901+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:07.767 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:08.396 [print] {
"resourceType": "MedicationStatement",
"id": "20357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:10.901+02:00",
"source": "#UpmOYycpMfUCdJpy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:09.025 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:09.672 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:12.171+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:12.171+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:09.673 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:10.283 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:10.283 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1g3W9T0NTAeGYsFx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20358/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20358/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:10.283 [print] {
"resourceType": "MedicationStatement",
"id": "20358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:13.429+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:10.283 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:10.284 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:10.284 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1g3W9T0NTAeGYsFx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20358/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20358/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:10.284 [print] {
"resourceType": "MedicationStatement",
"id": "20358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:13.429+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:10.284 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:10.882 [print] {
"resourceType": "MedicationStatement",
"id": "20358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:13.429+02:00",
"source": "#1g3W9T0NTAeGYsFx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:11.505 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:12.361 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:14.641+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:14.641+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:12.363 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:12.989 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:12.990 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kg8vYYurMVqOKZ4p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20359/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20359/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:12.990 [print] {
"resourceType": "MedicationStatement",
"id": "20359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:16.134+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:12.990 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:12.991 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:12.991 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Kg8vYYurMVqOKZ4p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20359/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20359/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:12.992 [print] {
"resourceType": "MedicationStatement",
"id": "20359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:16.134+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:12.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:13.895 [print] {
"resourceType": "MedicationStatement",
"id": "20359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:16.134+02:00",
"source": "#Kg8vYYurMVqOKZ4p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:14.535 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:15.170 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:17.684+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:17.684+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:15.172 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:15.798 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:15.798 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"07Gppx2WGexqhniW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20360/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20360/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:15.798 [print] {
"resourceType": "MedicationStatement",
"id": "20360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:18.926+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:15.798 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:15.800 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:15.800 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"07Gppx2WGexqhniW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20360/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20360/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:15.800 [print] {
"resourceType": "MedicationStatement",
"id": "20360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:18.926+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:15.800 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:16.430 [print] {
"resourceType": "MedicationStatement",
"id": "20360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:18.926+02:00",
"source": "#07Gppx2WGexqhniW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:17.042 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:17.662 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:20.184+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:20.184+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:17.663 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:18.284 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:18.284 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GqOzjUpP89q3oKug"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20361/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20361/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:18.284 [print] {
"resourceType": "MedicationStatement",
"id": "20361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:21.416+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:18.284 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:18.286 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:18.286 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GqOzjUpP89q3oKug"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20361/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20361/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:18.286 [print] {
"resourceType": "MedicationStatement",
"id": "20361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:21.416+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:18.286 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:18.879 [print] {
"resourceType": "MedicationStatement",
"id": "20361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:21.416+02:00",
"source": "#GqOzjUpP89q3oKug",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:19.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:20.541 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:22.972+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:22.972+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:20.542 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:21.171 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:21.172 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zXX6WTivmGBkJ4Dr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20362/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20362/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:21.172 [print] {
"resourceType": "MedicationStatement",
"id": "20362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:24.299+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:21.172 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:21.173 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:21.173 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zXX6WTivmGBkJ4Dr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20362/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20362/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:21.173 [print] {
"resourceType": "MedicationStatement",
"id": "20362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:24.299+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:21.173 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:21.817 [print] {
"resourceType": "MedicationStatement",
"id": "20362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:24.299+02:00",
"source": "#zXX6WTivmGBkJ4Dr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:22.454 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:23.089 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:25.598+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:25.598+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:23.090 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:23.732 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:23.733 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zyxCX75j7BDdAdmj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20363/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20363/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:23.733 [print] {
"resourceType": "MedicationStatement",
"id": "20363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:26.874+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:23.733 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:23.734 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:23.734 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zyxCX75j7BDdAdmj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20363/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20363/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:23.734 [print] {
"resourceType": "MedicationStatement",
"id": "20363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:26.874+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:23.734 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:24.327 [print] {
"resourceType": "MedicationStatement",
"id": "20363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:26.874+02:00",
"source": "#zyxCX75j7BDdAdmj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:24.954 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:25.573 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:28.104+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:28.104+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:25.575 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:26.177 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:26.177 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TUGOAxp5KW9tpv4T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20364/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20364/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:26.177 [print] {
"resourceType": "MedicationStatement",
"id": "20364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:29.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:26.177 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:26.179 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:26.179 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TUGOAxp5KW9tpv4T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20364/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20364/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:26.179 [print] {
"resourceType": "MedicationStatement",
"id": "20364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:29.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:26.179 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:26.773 [print] {
"resourceType": "MedicationStatement",
"id": "20364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:29.322+02:00",
"source": "#TUGOAxp5KW9tpv4T",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:27.391 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:27.995 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:30.531+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:30.531+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:27.997 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:28.635 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:28.635 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GqyX3IjiCsddWehV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20365/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20365/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:28.635 [print] {
"resourceType": "MedicationStatement",
"id": "20365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:31.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:28.635 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:28.636 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:28.636 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GqyX3IjiCsddWehV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20365/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20365/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:28.636 [print] {
"resourceType": "MedicationStatement",
"id": "20365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:31.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:28.636 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:29.231 [print] {
"resourceType": "MedicationStatement",
"id": "20365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:31.777+02:00",
"source": "#GqyX3IjiCsddWehV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:29.864 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:30.492 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:33.010+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:33.010+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:30.494 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:31.211 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:31.211 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9SwWZuiMcH9L8v5G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20366/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20366/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:31.211 [print] {
"resourceType": "MedicationStatement",
"id": "20366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:34.355+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:31.211 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:31.213 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:31.213 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9SwWZuiMcH9L8v5G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20366/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20366/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:31.213 [print] {
"resourceType": "MedicationStatement",
"id": "20366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:34.355+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:31.213 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:31.849 [print] {
"resourceType": "MedicationStatement",
"id": "20366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:34.355+02:00",
"source": "#9SwWZuiMcH9L8v5G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:32.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:33.080 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:35.596+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:35.596+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:33.081 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:33.709 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:33.709 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KpNMt0rNzR408CDo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20367/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20367/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:33.710 [print] {
"resourceType": "MedicationStatement",
"id": "20367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:36.853+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:33.710 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:04:33.711 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:04:33.711 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KpNMt0rNzR408CDo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20367/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:04:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/20367/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:04:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:04:33.712 [print] {
"resourceType": "MedicationStatement",
"id": "20367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:36.853+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
11:04:33.712 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:04:34.307 [print] {
"resourceType": "MedicationStatement",
"id": "20367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:04:36.853+02:00",
"source": "#KpNMt0rNzR408CDo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
11:04:34.918 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
11:04:35.795 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:04:38.064+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:04:38.064+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:35.796 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
http call failed after 21030 milliseconds for url: https://psp-sp-fhir.prep.sanit.cineca.it/fhir/MedicationStatement karate/src/features/api/xaj.feature:19
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
11:04:56.827 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
http call failed after 21037 milliseconds for url: https://psp-sp-fhir.prep.sanit.cineca.it/fhir/MedicationStatement karate/src/features/api/xaj.feature:19
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response